Skip to content

charton API


charton API / @chart-on/core / index / ChartLayout

Interface: ChartLayout ​

Defined in: packages/core/src/layout.ts:76

A saved chart layout: what the user arranged, never the bars. Every part but version is optional when loading; a missing part leaves that part of the chart as it is.

Properties ​

drawings? ​

optional drawings?: SerializedDrawings

Defined in: packages/core/src/layout.ts:88


indicators? ​

optional indicators?: IndicatorState[]

Defined in: packages/core/src/layout.ts:87

Indicator states; each one's pane is its index in panes.


interval? ​

optional interval?: Interval

Defined in: packages/core/src/layout.ts:81


mainSeries? ​

optional mainSeries?: Partial<Pick<CandleSeriesOptions, "style" | "lineStyle" | "lineWidth" | "upColor" | "downColor" | "upWickColor" | "downWickColor" | "upBorderColor" | "downBorderColor" | "wicks" | "borders" | "colorByPreviousClose" | "bodyRatio" | "thinBars" | "baseLevel">>

Defined in: packages/core/src/layout.ts:82


maximizedPane? ​

optional maximizedPane?: number

Defined in: packages/core/src/layout.ts:85

Index of the maximized pane, when one is.


meta? ​

optional meta?: LayoutMeta

Defined in: packages/core/src/layout.ts:78


panes? ​

optional panes?: LayoutPane[]

Defined in: packages/core/src/layout.ts:83


symbol? ​

optional symbol?: string

Defined in: packages/core/src/layout.ts:80

Symbol id (not its display name) loaded through the data source.


toolDefaults? ​

optional toolDefaults?: Record<string, DrawingStyle>

Defined in: packages/core/src/layout.ts:94

The style new drawings of each tool start with, by tool type, as chart.drawings.serializeToolDefaults() reports it. Saved with or without drawings.


version ​

version: 1

Defined in: packages/core/src/layout.ts:77


visibleRange? ​

optional visibleRange?: object

Defined in: packages/core/src/layout.ts:96

Saved only with serializeLayout({ visibleRange: true }).

from ​

from: number

to ​

to: number