Skip to content

charton API


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

Interface: BarMarker ​

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

A shape pinned to a bar, e.g. an execution or a signal. Users cannot move it.

Properties ​

color? ​

optional color?: string

Defined in: packages/core/src/annotations/types.ts:91

Default: the theme's up colour for arrow-up and triangle-up, down for arrow-down and triangle-down, line colour otherwise.


icon? ​

optional icon?: MarkerIcon

Defined in: packages/core/src/annotations/types.ts:99

Drawn instead of the shape; the shape still sets the default position and colour. Kept by reference.


id? ​

optional id?: string

Defined in: packages/core/src/annotations/types.ts:75

Identifies the marker in events, updateMarker and removeMarker. Unique within its series' set.


kind? ​

optional kind?: string

Defined in: packages/core/src/annotations/types.ts:101

Event category, e.g. news: what clustering groups by and setMarkerFilter selects.


position? ​

optional position?: MarkerPosition

Defined in: packages/core/src/annotations/types.ts:80

Default: below for arrow-up and triangle-up, above for every other shape.


price? ​

optional price?: number

Defined in: packages/core/src/annotations/types.ts:86

Price of an atPrice marker, on its series' scale. Required for atPrice, ignored otherwise. As the data source sends it: on the main pane it draws at its bar's adjusted price under the chart's adjustment option.


severity? ​

optional severity?: MarkerSeverity

Defined in: packages/core/src/annotations/types.ts:102


shape ​

shape: MarkerShape

Defined in: packages/core/src/annotations/types.ts:78


size? ​

optional size?: number

Defined in: packages/core/src/annotations/types.ts:95

Size multiplier (default 1).


text? ​

optional text?: string

Defined in: packages/core/src/annotations/types.ts:93

Short label next to the shape; the content of a label.


time ​

time: number

Defined in: packages/core/src/annotations/types.ts:77

Bar time (unix seconds). A time between two bars lands on the bar that contains it.


tooltip? ​

optional tooltip?: string | string[]

Defined in: packages/core/src/annotations/types.ts:97

Text shown while hovering the marker; several strings are several lines.