Skip to content

charton API


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

Interface: TextLabelOptions ​

Defined in: packages/core/src/annotations/zones.ts:60

A text box pinned to a time and a price, e.g. a note on a bar.

Properties ​

align ​

align: TextLabelAlign

Defined in: packages/core/src/annotations/zones.ts:73

left: the box starts at the anchor, right: it ends there, center (default): centred on it.


background? ​

optional background?: string

Defined in: packages/core/src/annotations/zones.ts:69

Box colour. Default: the theme's labelBackground.


color? ​

optional color?: string

Defined in: packages/core/src/annotations/zones.ts:67

Text colour. Default: the theme's labelText.


fontSize? ​

optional fontSize?: number

Defined in: packages/core/src/annotations/zones.ts:71

Font size in css px. Default: the theme's font size.


pointerLength ​

pointerLength: number

Defined in: packages/core/src/annotations/zones.ts:79

Length in css px of a pointer line from the anchor to the box. Positive puts the box above the anchor, negative below it, 0 (default) centres the box on the anchor with no line.


price ​

price: number

Defined in: packages/core/src/annotations/zones.ts:64

Price of the anchor; on the main pane it draws at its bar's adjusted price under the chart's adjustment option.


series? ​

optional series?: Series<object>

Defined in: packages/core/src/annotations/zones.ts:81

Series whose price scale and pane the label follows. Default: the main series.


text ​

text: string

Defined in: packages/core/src/annotations/zones.ts:65


time ​

time: number

Defined in: packages/core/src/annotations/zones.ts:62

Bar time of the anchor (unix seconds); the anchor sits at the centre of that bar.