charton API / @chart-on/ui / index / AppSettingField
Interface: AppSettingField
Defined in: ui/src/chart-settings.ts:38
A settings field the app reads and writes itself instead of a chart option, e.g. the shell theme or the language. It takes the same kinds as option fields; when.path may name an option path or another app field's id.
Extends
Omit<ChartSettingField,"path"|"unset">
Properties
choices?
optionalchoices?: readonlyChartSettingChoice[]
Defined in: core/src/chart-settings.ts:39
The values a select offers.
Inherited from
Omit.choices
hint?
optionalhint?:string
Defined in: core/src/chart-settings.ts:37
Help text under the control.
Inherited from
Omit.hint
id
id:
string
Defined in: ui/src/chart-settings.ts:40
Unique among the dialog's fields and distinct from option paths.
kind
kind:
ChartSettingKind
Defined in: core/src/chart-settings.ts:35
Inherited from
Omit.kind
label
label:
string
Defined in: core/src/chart-settings.ts:34
Inherited from
Omit.label
max?
optionalmax?:number
Defined in: core/src/chart-settings.ts:41
Inherited from
Omit.max
min?
optionalmin?:number
Defined in: core/src/chart-settings.ts:40
Inherited from
Omit.min
plugin?
optionalplugin?:string
Defined in: core/src/chart-settings.ts:50
Show the field only on a chart with this plugin installed (its ChartPlugin.name), whose option it sets.
Inherited from
Omit.plugin
step?
optionalstep?:number
Defined in: core/src/chart-settings.ts:42
Inherited from
Omit.step
unit?
optionalunit?:string
Defined in: core/src/chart-settings.ts:44
Shown after a slider's value, e.g. %.
Inherited from
Omit.unit
when?
optionalwhen?:object
Defined in: core/src/chart-settings.ts:48
Show the field only while the setting at path equals equals.
equals
equals:
unknown
path
path:
string
Inherited from
Omit.when
Methods
get()
get(
chart):unknown
Defined in: ui/src/chart-settings.ts:42
The current value; undefined leaves the field out.
Parameters
chart
Returns
unknown
set()
set(
chart,value):void
Defined in: ui/src/chart-settings.ts:44
Apply value: called on each edit, and with the opening value on Cancel.
Parameters
chart
value
unknown
Returns
void