Skip to content

charton API


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

Interface: ChartTheme ​

Defined in: packages/core/src/theme.ts:10

Colours and fonts the chart draws with: background, grid, text, crosshair, up and down colours, drawings, annotations and more. See darkTheme and themeFromCss.

Properties ​

alert ​

alert: string

Defined in: packages/core/src/theme.ts:61

Alert lines (chart.annotations.addAlertLine).


annotationFill ​

annotationFill: string

Defined in: packages/core/src/theme.ts:65

Default fill of time bands and price zones (chart.annotations.addTimeBand, addPriceZone); keep it translucent.


ask ​

ask: string

Defined in: packages/core/src/theme.ts:54

Ask line and label.


background ​

background: string

Defined in: packages/core/src/theme.ts:11


backgroundBottom? ​

optional backgroundBottom?: string

Defined in: packages/core/src/theme.ts:17

Bottom color of a vertical background gradient: the canvas fades from background at the top to this at the bottom. Unset, the background is solid. Text halos and label pills keep using background.


bid ​

bid: string

Defined in: packages/core/src/theme.ts:52

Bid line and label.


crosshair ​

crosshair: string

Defined in: packages/core/src/theme.ts:33


depthAsk? ​

optional depthAsk?: string

Defined in: packages/core/src/theme.ts:57


depthBid? ​

optional depthBid?: string

Defined in: packages/core/src/theme.ts:56

Depth lane bars on the bid and ask side; default to bid and ask.


down ​

down: string

Defined in: packages/core/src/theme.ts:37


downBorder? ​

optional downBorder?: string

Defined in: packages/core/src/theme.ts:43


downWick? ​

optional downWick?: string

Defined in: packages/core/src/theme.ts:40


drawing ​

drawing: string

Defined in: packages/core/src/theme.ts:46


drawingFill ​

drawingFill: string

Defined in: packages/core/src/theme.ts:48


drawingSelected ​

drawingSelected: string

Defined in: packages/core/src/theme.ts:47


extendedHours ​

extendedHours: string

Defined in: packages/core/src/theme.ts:59

Price label outside the regular session (pre and post session).


fontFamily ​

fontFamily: string

Defined in: packages/core/src/theme.ts:25


fontSize ​

fontSize: number

Defined in: packages/core/src/theme.ts:26


grid ​

grid: string

Defined in: packages/core/src/theme.ts:18


gridHorizontal? ​

optional gridHorizontal?: string

Defined in: packages/core/src/theme.ts:20

Horizontal and vertical grid lines when they differ from grid; optional.


gridVertical? ​

optional gridVertical?: string

Defined in: packages/core/src/theme.ts:21


heatmap ​

heatmap: string[]

Defined in: packages/core/src/theme.ts:67

Heatmap color ramp, low → high intensity.


labelBackground ​

labelBackground: string

Defined in: packages/core/src/theme.ts:34


labelText ​

labelText: string

Defined in: packages/core/src/theme.ts:35


levelBlue? ​

optional levelBlue?: string

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


levelGreen? ​

optional levelGreen?: string

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


levelNeutral? ​

optional levelNeutral?: string

Defined in: packages/core/src/theme.ts:79

Named level colors a drawing level can pick ({ value: 0.618, color: 'levelGreen' }) to follow the theme. The built-in tools' default levels do not use them: those take the shared level rule (levelColor), which derives every level's color from text, drawing and background. The names stay so levels that pick one, such as saved drawings, keep their color. Optional: a level whose color is unset here takes the drawing's color, and a theme without levelNeutral draws rule levels in the drawing's color too.


levelOrange? ​

optional levelOrange?: string

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


levelPurple? ​

optional levelPurple?: string

Defined in: packages/core/src/theme.ts:84


levelRed? ​

optional levelRed?: string

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


line ​

line: string

Defined in: packages/core/src/theme.ts:45

Default line/area series color.


referenceLine ​

referenceLine: string

Defined in: packages/core/src/theme.ts:50

Previous close and the visible high, low and average lines.


separator ​

separator: string

Defined in: packages/core/src/theme.ts:22


text ​

text: string

Defined in: packages/core/src/theme.ts:23


textMuted ​

textMuted: string

Defined in: packages/core/src/theme.ts:24


timeMark? ​

optional timeMark?: string

Defined in: packages/core/src/theme.ts:63

Default colour of the data source's timeAxis markers (DataSource.markers); default line.


typography? ​

optional typography?: ChartTypography

Defined in: packages/core/src/theme.ts:32

Font weight, numerals and per-surface fonts (axis, legend, labels, drawings, watermark, markers). Optional: unset, every surface uses fontFamily and fontSize with tabular numerals.


up ​

up: string

Defined in: packages/core/src/theme.ts:36


upBorder? ​

optional upBorder?: string

Defined in: packages/core/src/theme.ts:42

Candle body outlines; no separate outline when unset.


upWick? ​

optional upWick?: string

Defined in: packages/core/src/theme.ts:39

Candle wicks of rising and falling bars; default to up / down.


watermark ​

watermark: string

Defined in: packages/core/src/theme.ts:69

Watermark text, faint enough to sit behind the series.