Skip to content

charton API


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

Class: DraftLine ​

Defined in: packages/core/src/annotations/lines.ts:123

Handle returned by chart.annotations.startOrderDraft: an order the user is still composing.

Extends ​

Constructors ​

Constructor ​

new DraftLine(options, owner): DraftLine

Defined in: packages/core/src/annotations/lines.ts:46

Parameters ​

options ​

DraftLineOptions

owner ​

LineOwner

Returns ​

DraftLine

Inherited from ​

AnnotationLine<DraftLineOptions>.constructor

Properties ​

owner ​

protected readonly owner: LineOwner

Defined in: packages/core/src/annotations/lines.ts:48

Inherited from ​

AnnotationLine.owner

Accessors ​

options ​

Get Signature ​

get options(): Readonly<O>

Defined in: packages/core/src/annotations/lines.ts:54

Returns ​

Readonly<O>

Inherited from ​

AnnotationLine.options


visible ​

Get Signature ​

get visible(): boolean

Defined in: packages/core/src/annotations/lines.ts:58

Returns ​

boolean

Inherited from ​

AnnotationLine.visible

Methods ​

applyOptions() ​

applyOptions(patch): void

Defined in: packages/core/src/annotations/lines.ts:63

Merge new options and redraw. Throws on invalid options, leaving the current ones.

Parameters ​

patch ​

Partial<O>

Returns ​

void

Inherited from ​

AnnotationLine.applyOptions


check() ​

protected check(o): void

Defined in: packages/core/src/annotations/lines.ts:134

Parameters ​

o ​

DraftLineOptions

Returns ​

void

Overrides ​

AnnotationLine.check


commit() ​

commit(): void

Defined in: packages/core/src/annotations/lines.ts:125

Place it: emits order:create with the draft's fields and removes the draft.

Returns ​

void


discard() ​

discard(): void

Defined in: packages/core/src/annotations/lines.ts:130

Throw it away without placing it.

Returns ​

void


optionsChanged() ​

protected optionsChanged(): void

Defined in: packages/core/src/annotations/lines.ts:88

Drop caches derived from the options.

Returns ​

void

Inherited from ​

AnnotationLine.optionsChanged


prepare() ​

protected prepare(_options): void

Defined in: packages/core/src/annotations/lines.ts:85

Hook between checking and committing new options; may throw to reject them.

Parameters ​

_options ​

DraftLineOptions

Returns ​

void

Inherited from ​

AnnotationLine.prepare


remove() ​

remove(): void

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

Returns ​

void

Inherited from ​

AnnotationLine.remove


setVisible() ​

setVisible(visible): void

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

Hide or show it; its options are kept.

Parameters ​

visible ​

boolean

Returns ​

void

Inherited from ​

AnnotationLine.setVisible