Skip to content

charton API


charton API / @chart-on/react / shell / ChartShellProps

Interface: ChartShellProps ​

Defined in: shell.ts:36

The props of <ChartShell>: chart options and data, plus shell set-up, event handlers and container attributes.

Extends ​

Properties ​

children? ​

optional children?: ReactNode

Defined in: shell.ts:58

Rendered inside the container; useChart() and useChartShell() in them return this shell's instances.


className? ​

optional className?: string

Defined in: shell.ts:55


dataSource? ​

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

ChartInputs.dataSource


features? ​

optional features?: Partial<ShellFeatures>

Defined in: shell.ts:48

Shell parts to show or hide; changes go through applyFeatures and are compared by value.


id? ​

optional id?: string

Defined in: shell.ts:54

Attributes of the container element. Give it a height: the shell fills it.


interval? ​

optional interval?: Interval

Defined in: sync.ts:23

Inherited from ​

ChartInputs.interval


on? ​

optional on?: ChartEventHandlers

Defined in: shell.ts:50

Chart events to listen to, keyed by event name.


options? ​

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

ChartInputs.options


palette? ​

optional palette?: ShellPalette

Defined in: shell.ts:46

Up and down colours; changes go through setPalette.


shellOn? ​

optional shellOn?: ShellEventHandlers

Defined in: shell.ts:52

Shell events to listen to, keyed by event name, e.g. { 'theme:change': (e) => … }.


shellOptions? ​

optional shellOptions?: ShellCreationOptions

Defined in: shell.ts:42

Toolbar, rail, dialogs and the rest of the shell's set-up. Read once, when the shell is created: to change them, remount the component on purpose, for example with a new key.


style? ​

optional style?: CSSProperties

Defined in: shell.ts:56


symbol? ​

optional symbol?: string

Defined in: sync.ts:22

Symbol to load from dataSource; loads once both it and interval are set.

Inherited from ​

ChartInputs.symbol


theme? ​

optional theme?: ShellTheme

Defined in: shell.ts:44

Colour scheme of the chrome and the chart; changes go through setTheme. Default dark.