Skip to content

charton API


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

Interface: SourceMarker ​

Defined in: packages/core/src/data/types.ts:186

An event the data source sends for a time, such as earnings, a dividend, a news item or a session note. Named for what draws it, an annotation marker (BarMarker), with the same field names; "source" tells it apart from the markers the app sets, so annotations.setMarkers never replaces it. A timeAxis marker draws as a badge under the time labels; badges that would overlap fold into one showing their count.

Properties ​

color? ​

optional color?: string

Defined in: packages/core/src/data/types.ts:196

Default: the theme's line colour; for timeAxis, its timeMark colour first.


id ​

id: string

Defined in: packages/core/src/data/types.ts:188

Unique among the source's markers for the symbol and interval: one fetched again with the same id replaces the old one.


kind? ​

optional kind?: string

Defined in: packages/core/src/data/types.ts:204

Event category, e.g. 'earnings', for annotations.setMarkerFilter and folding.


position? ​

optional position?: SourceMarkerPosition

Defined in: packages/core/src/data/types.ts:192

Default 'bottom': the lane along the pane's bottom edge, where markers stack upwards, as data source events have no price.


severity? ​

optional severity?: MarkerSeverity

Defined in: packages/core/src/data/types.ts:206

For annotations.setMarkerFilter's minSeverity.


shape? ​

optional shape?: MarkerShape

Defined in: packages/core/src/data/types.ts:200

Default 'circle'. Ignored on the time axis, like size, kind and severity.


size? ​

optional size?: number

Defined in: packages/core/src/data/types.ts:202

Size multiplier (default 1).


text? ​

optional text?: string

Defined in: packages/core/src/data/types.ts:194

Short text next to the shape or in the badge (one or two characters read best); the content of a label.


time ​

time: number

Defined in: packages/core/src/data/types.ts:190

Unix seconds. A time between two bars lands on the bar that contains it.


tooltip? ​

optional tooltip?: string

Defined in: packages/core/src/data/types.ts:198

Plain text shown while hovering, never read as markup; \n breaks lines, as in the chart's other text fields.