charton API / @chart-on/ui / index / ColorControlOptions
Interface: ColorControlOptions
Defined in: ui/src/color-control.ts:50
Options for createColorControl: its accessible name, the starting color, swatches, and the live-change and commit callbacks.
Properties
label
label:
string
Defined in: ui/src/color-control.ts:52
Accessible name, e.g. "Rising candle body".
localization?
optionallocalization?:Localizer
Defined in: ui/src/color-control.ts:60
The language of the picker's own text, usually chart.localization. Default English.
swatches?
optionalswatches?: readonlystring[]
Defined in: ui/src/color-control.ts:58
value
value:
string
Defined in: ui/src/color-control.ts:53
Methods
onCommit()?
optionalonCommit(color):void
Defined in: ui/src/color-control.ts:57
Called once when the picker closes after a change, e.g. to record one undo step.
Parameters
color
string
Returns
void
onInput()
onInput(
color):void
Defined in: ui/src/color-control.ts:55
Called on every change while the user picks, for a live preview.
Parameters
color
string
Returns
void