Skip to content

charton API


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 ​

Properties ​

choices? ​

optional choices?: readonly ChartSettingChoice[]

Defined in: core/src/chart-settings.ts:39

The values a select offers.

Inherited from ​

Omit.choices


hint? ​

optional hint?: 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? ​

optional max?: number

Defined in: core/src/chart-settings.ts:41

Inherited from ​

Omit.max


min? ​

optional min?: number

Defined in: core/src/chart-settings.ts:40

Inherited from ​

Omit.min


plugin? ​

optional plugin?: 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? ​

optional step?: number

Defined in: core/src/chart-settings.ts:42

Inherited from ​

Omit.step


unit? ​

optional unit?: string

Defined in: core/src/chart-settings.ts:44

Shown after a slider's value, e.g. %.

Inherited from ​

Omit.unit


when? ​

optional when?: 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 ​

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 ​

Chart

value ​

unknown

Returns ​

void