Skip to content

charton API


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

Interface: DraftLineOptions ​

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

Options of an order draft (annotations.startOrderDraft): an order the user is still composing. Its price, take-profit and stop-loss drag freely; nothing reaches the app until commit().

Extends ​

Properties ​

color? ​

optional color?: string

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

Default: the theme's up colour for buys, down for sells.


labelAnchor? ​

optional labelAnchor?: 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 ​

LineLabelOptions.labelAnchor


lineStyle ​

lineStyle: LineStyle

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


lineWidth ​

lineWidth: number

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


price ​

price: number

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


priceAxisLabel? ​

optional priceAxisLabel?: boolean

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

The price label on the axis. Default true.

Inherited from ​

LineLabelOptions.priceAxisLabel


quantity? ​

optional quantity?: number

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

Omitted until the user sets one.


series? ​

optional series?: Series<object>

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

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


side ​

side: OrderSide

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


stopLoss? ​

optional stopLoss?: number | null

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


takeProfit? ​

optional takeProfit?: number | null

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


tickSize? ​

optional tickSize?: number

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

Dragged prices snap to multiples of this. Default: one unit of the series precision.


type ​

type: OrderType

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