charton API / @chart-on/ui / index / ChartShell
Interface: ChartShell
Defined in: ui/src/shell.ts:304
A chart with its shell made by createChartShell: the root element, the core chart, and handles of the toolbar, tool rail, bottom bar, dialogs and panels it created (null for parts turned off).
Properties
appearance
appearance:
AppearanceHandle|null
Defined in: ui/src/shell.ts:331
bottomBar
bottomBar:
ToolbarHandle|null
Defined in: ui/src/shell.ts:309
chart
chart:
Chart
Defined in: ui/src/shell.ts:306
clusterList
clusterList:
ClusterListHandle|null
Defined in: ui/src/shell.ts:328
The order cluster list; null without the clusterList option.
colorPreset
readonlycolorPreset:string|null
Defined in: ui/src/shell.ts:361
Id of the colour preset in use; null for the default theme or without the appearance feature.
commandPalette
commandPalette:
CommandPalette|null
Defined in: ui/src/shell.ts:317
The command palette; null without the commandPalette option. Add entries with addSource.
contextMenu
contextMenu:
ContextMenuHandle|null
Defined in: ui/src/shell.ts:335
direction
readonlydirection:ShellDirection
Defined in: ui/src/shell.ts:357
draftEditor
draftEditor:
DraftEditorHandle|null
Defined in: ui/src/shell.ts:330
The order draft keypad and type menu; null without the draftEditor option.
drawingSettings
drawingSettings:
DrawingSettingsHandle|null
Defined in: ui/src/shell.ts:320
Present unless drawingSettings is false; open(id) shows a drawing's settings.
drawingToolbar
drawingToolbar:
DrawingToolbarHandle|null
Defined in: ui/src/shell.ts:318
el
el:
HTMLElement
Defined in: ui/src/shell.ts:305
favorites
favorites:
ShellFavorites|null
Defined in: ui/src/shell.ts:313
Favourite drawing tools and their bar; null without the favorites option.
features
readonlyfeatures:Readonly<ShellFeatures>
Defined in: ui/src/shell.ts:342
Current shell flags; change them with applyFeatures.
indicatorPicker
indicatorPicker:
IndicatorPickerHandle|null
Defined in: ui/src/shell.ts:336
indicatorSettings
indicatorSettings:
IndicatorSettingsHandle|null
Defined in: ui/src/shell.ts:322
Present unless indicatorSettings is false; open(indicator) shows an indicator's settings.
indicatorTemplates
indicatorTemplates:
IndicatorTemplatesHandle|null
Defined in: ui/src/shell.ts:338
Indicator templates; null with indicatorTemplates: false.
navigator
navigator:
NavigatorHandle|null
Defined in: ui/src/shell.ts:311
The overview strip; null unless the navigator option is set.
palette
readonlypalette:ShellPalette
Defined in: ui/src/shell.ts:354
panels
readonlypanels:Readonly<ShellPanels>
Defined in: ui/src/shell.ts:346
Current panel style of each part; change them with setPanels.
rail
rail:
ToolRailHandle|null
Defined in: ui/src/shell.ts:308
replayControls
replayControls:
ReplayControlsHandle|null
Defined in: ui/src/shell.ts:326
The bar replay strip; null without the replayControls option.
resolvedTheme
readonlyresolvedTheme:"dark"|"light"
Defined in: ui/src/shell.ts:351
The scheme in effect: theme, with system resolved through the OS setting.
seriesSettings
seriesSettings:
SeriesSettingsHandle|null
Defined in: ui/src/shell.ts:324
Present unless indicatorSettings is false; open(series) shows a compared symbol's or plain series' style panel.
settings
settings:
ChartSettingsHandle|null
Defined in: ui/src/shell.ts:333
The chart settings dialog; null with settings: false.
symbolSearch
symbolSearch:
SymbolSearchDialog|null
Defined in: ui/src/shell.ts:315
The symbol search dialog; null without the symbolSearch option. Open it from a toolbar item with open().
tableView
tableView:
TableViewHandle|null
Defined in: ui/src/shell.ts:334
theme
readonlytheme:ShellTheme
Defined in: ui/src/shell.ts:349
toasts
toasts:
ToastStackHandle|null
Defined in: ui/src/shell.ts:340
The stack showing chart.notify messages; null without the toasts option.
toolbar
toolbar:
ToolbarHandle|null
Defined in: ui/src/shell.ts:307
Methods
applyFeatures()
applyFeatures(
features):void
Defined in: ui/src/shell.ts:344
Show or hide shell parts; flags left out keep their value.
Parameters
features
Partial<ShellFeatures>
Returns
void
destroy()
destroy():
void
Defined in: ui/src/shell.ts:372
Returns
void
on()
on<
K>(event,listener): () =>void
Defined in: ui/src/shell.ts:371
Subscribe to shell events; returns an unsubscribe function.
Type Parameters
K
K extends keyof ShellEvents
Parameters
event
K
listener
(payload) => void
Returns
() => void
refreshTheme()
refreshTheme():
void
Defined in: ui/src/shell.ts:369
Re-read the CSS chart tokens, e.g. after changing a stylesheet.
Returns
void
setColorPreset()
setColorPreset(
id):void
Defined in: ui/src/shell.ts:367
Restyle chrome and chart with a colour preset of the appearance panel (by id), or go back to the default theme with null. The preset's variant follows the theme's resolved scheme. Unknown ids do nothing.
Parameters
id
string | null
Returns
void
setDirection()
setDirection(
direction):void
Defined in: ui/src/shell.ts:359
Lay the chrome and the chart's defaults out left to right, right to left, or as the page does (auto).
Parameters
direction
Returns
void
setPalette()
setPalette(
palette):void
Defined in: ui/src/shell.ts:356
Switch the up and down colours of the chrome and the chart, over the current theme.
Parameters
palette
Returns
void
setPanels()
setPanels(
panels):void
Defined in: ui/src/shell.ts:348
Restyle every part, or the parts given; parts left out keep their style.
Parameters
panels
ShellPanelStyle | Partial<ShellPanels>
Returns
void
setTheme()
setTheme(
theme):void
Defined in: ui/src/shell.ts:353
Switch chrome and chart colours together.
Parameters
theme
Returns
void