charton API / @chart-on/core / index / AlertLineOptions
Interface: AlertLineOptions
Defined in: packages/core/src/annotations/types.ts:367
Options of an alert line. The chart only shows and edits alerts; checking them against live prices is the application's job (see alertsCrossed). A line can be dragged only with onDrag or onChange, and has a remove button only with onRemove.
Extends
Properties
color?
optionalcolor?:string
Defined in: packages/core/src/annotations/types.ts:374
Default: the theme's alert colour.
label
label:
string
Defined in: packages/core/src/annotations/types.ts:370
First segment of the label block. Default: Alert.
labelAnchor?
optionallabelAnchor?:LabelAnchor
Defined in: packages/core/src/annotations/types.ts:160
Where the label block sits: right (default, next to the price axis), center or left. Brackets follow their order.
Inherited from
lineOnly?
optionallineOnly?:boolean
Defined in: packages/core/src/annotations/types.ts:164
Only the line: no label block, no hit testing. For dense ladders of many orders.
Inherited from
lineStyle
lineStyle:
LineStyle
Defined in: packages/core/src/annotations/types.ts:377
Default: dotted, so alerts read differently from order and position lines.
lineWidth
lineWidth:
number
Defined in: packages/core/src/annotations/types.ts:375
onChange?
optionalonChange?: (e) =>void
Defined in: packages/core/src/annotations/types.ts:385
Drag released at a new price. The line keeps the new price.
Parameters
e
Returns
void
onClick?
optionalonClick?: (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
Returns
void
Inherited from
LineInteractionOptions.onClick
onDrag?
optionalonDrag?: (e) =>void
Defined in: packages/core/src/annotations/types.ts:383
While dragging, whenever the snapped price changes (and once more after Escape).
Parameters
e
Returns
void
onHover?
optionalonHover?: (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
Returns
void
Inherited from
LineInteractionOptions.onHover
onHoverEnd?
optionalonHoverEnd?: () =>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
onRemove?
optionalonRemove?: () =>void
Defined in: packages/core/src/annotations/types.ts:387
The remove button was pressed. Without it, no button is shown.
Returns
void
price
price:
number
Defined in: packages/core/src/annotations/types.ts:368
priceAxisLabel?
optionalpriceAxisLabel?:boolean
Defined in: packages/core/src/annotations/types.ts:162
The price label on the axis. Default true.
Inherited from
LineLabelOptions.priceAxisLabel
series?
optionalseries?:Series<object>
Defined in: packages/core/src/annotations/types.ts:379
Series whose price scale and pane the line follows. Default: the main series.
tickSize?
optionaltickSize?:number
Defined in: packages/core/src/annotations/types.ts:381
Dragged prices snap to multiples of this. Default: one unit of the series precision.
title?
optionaltitle?:string
Defined in: packages/core/src/annotations/types.ts:372
Optional text after the label, e.g. the alert's condition or a note.
tooltip?
optionaltooltip?:string|string[]
Defined in: packages/core/src/annotations/types.ts:154
Text shown while hovering the line; several strings are several lines.