Skip to content

charton API


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

Interface: PriceLineOptions ​

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

Options of a price line: a horizontal line at a fixed price with an optional title and price axis label, following a series' price scale and pane.

Extends ​

Properties ​

axisLabel ​

axisLabel: boolean

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

Show the price on the price axis.


color? ​

optional color?: string

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

Default: the theme line colour.


lineOnly? ​

optional lineOnly?: boolean

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

Only the line: no title and no hit testing, whatever the pointer callbacks.


lineStyle ​

lineStyle: LineStyle

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


lineWidth ​

lineWidth: number

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


onClick? ​

optional onClick?: (e) => void

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

Pressed and released on the line or its block without dragging it. Never after a drag.

Parameters ​

e ​

LinePointerEvent<PriceLine>

Returns ​

void

Inherited from ​

LineInteractionOptions.onClick


onHover? ​

optional onHover?: (e) => void

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

The pointer moved onto the line or its label block. Once per enter.

Parameters ​

e ​

LinePointerEvent<PriceLine>

Returns ​

void

Inherited from ​

LineInteractionOptions.onHover


onHoverEnd? ​

optional onHoverEnd?: () => void

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

The pointer left the line and its block. Once per leave.

Returns ​

void

Inherited from ​

LineInteractionOptions.onHoverEnd


price ​

price: number

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


series? ​

optional series?: Series<object>

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

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


title ​

title: string

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

Text above the line at the right edge of the pane.


tooltip? ​

optional tooltip?: string | string[]

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

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

Inherited from ​

LineInteractionOptions.tooltip