Skip to content

charton API


charton API / @chart-on/vue / shell / ChartShell

Variable: ChartShell ​

const ChartShell: DefineComponent<ExtractPropTypes<{ dataSource: PropType<DataSource | null>; features: PropType<Partial<ShellFeatures>>; interval: PropType<Interval>; on: PropType<ChartEventHandlers>; options: PropType<ChartOptionsPatch>; palette: PropType<ShellPalette>; shellOn: PropType<ShellEventHandlers>; shellOptions: PropType<ShellCreationOptions>; symbol: StringConstructor; theme: PropType<ShellTheme>; }>, () => VNode<RendererNode, RendererElement, {[key: string]: any; }>, { }, { }, { }, ComponentOptionsMixin, ComponentOptionsMixin, { }, string, PublicProps, ToResolvedProps<ExtractPropTypes<{ dataSource: PropType<DataSource | null>; features: PropType<Partial<ShellFeatures>>; interval: PropType<Interval>; on: PropType<ChartEventHandlers>; options: PropType<ChartOptionsPatch>; palette: PropType<ShellPalette>; shellOn: PropType<ShellEventHandlers>; shellOptions: PropType<ShellCreationOptions>; symbol: StringConstructor; theme: PropType<ShellTheme>; }>, { }>, { }, { }, { }, { }, string, ComponentProvideOptions, true, { }, any>

Defined in: shell.ts:78

The batteries-included widget: toolbar, drawing rail, bottom bar and the chart, in a div. Import @chart-on/ui/style.css once in the app. The shell is created when the component mounts and destroyed when it unmounts; prop changes update it in place. class, style and other attributes go to the div. The default slot renders inside it, where useChart() returns the shell's chart and useChartShell() the shell.