charton API / @chart-on/react / index / ChartProps
Interface: ChartProps
Defined in: chart.ts:7
The props of <Chart>: chart options and data, plus event handlers and container attributes.
Extends
Properties
children?
optionalchildren?:ReactNode
Defined in: chart.ts:20
Rendered inside the container; useChart() in them returns this chart.
className?
optionalclassName?:string
Defined in: chart.ts:17
dataSource?
optionaldataSource?:DataSource|null
Defined in: sync.ts:20
Where bars come from. Changing it attaches the new source and loads symbol again. The chart needs the dataSource() plugin in options.plugins (or builtins()); without it the source is not attached and development builds warn once (data-source-missing).
Inherited from
id?
optionalid?:string
Defined in: chart.ts:16
Attributes of the container element. Give it a height: the chart fills it.
interval?
optionalinterval?:Interval
Defined in: sync.ts:23
Inherited from
on?
optionalon?:ChartEventHandlers
Defined in: chart.ts:14
Chart events to listen to, keyed by event name, e.g. { 'crosshair:move': (e) => … }. Only the events listed here are subscribed. A new callback for the same event is used without subscribing again.
options?
optionaloptions?:ChartOptionsPatch
Defined in: sync.ts:14
Chart options. Given to the chart when it is created, then applied with applyOptions whenever they change. They are compared by value, so an object literal written inline does not apply again on every render.
Inherited from
style?
optionalstyle?:CSSProperties
Defined in: chart.ts:18
symbol?
optionalsymbol?:string
Defined in: sync.ts:22
Symbol to load from dataSource; loads once both it and interval are set.