charton API / @chart-on/core / index / Drawing
Interface: Drawing
Defined in: packages/core/src/drawing/types.ts:114
Serializable drawing. Points are stored in time/price so they survive data reloads.
Properties
autoscale?
optionalautoscale?:boolean
Defined in: packages/core/src/drawing/types.ts:139
true keeps the drawing's prices in view: while its time span overlaps the visible bars, its pane's autoscale fits them too, e.g. a target line above the data. Open price sides (vertical lines) add nothing. Default false.
below?
optionalbelow?:boolean
Defined in: packages/core/src/drawing/types.ts:145
true draws the drawing under the series (over the grid), e.g. a zone the candles stay readable over. Its selection handles stay on top. Default false.
group?
optionalgroup?:string
Defined in: packages/core/src/drawing/types.ts:161
Name of the group the drawing is in: a click on any drawing of a group selects them all, so they move, copy and delete as one. See DrawingManager.group.
hidden?
optionalhidden?:boolean
Defined in: packages/core/src/drawing/types.ts:149
Not drawn and not hit-tested; setVisible(id, true) shows it again.
history?
optionalhistory?:boolean
Defined in: packages/core/src/drawing/types.ts:132
false keeps the drawing's changes out of undo and redo, e.g. for drawings the app moves itself: they add no undo step, and undoing other changes leaves the drawing as it is. Default true.
id
id:
string
Defined in: packages/core/src/drawing/types.ts:115
indicator?
optionalindicator?:string
Defined in: packages/core/src/drawing/types.ts:174
Id of the indicator the drawing belongs to (see Indicator.id); a drawing started on an indicator's pane ties to it. It shows only while the indicator shows (not while it is hidden, off its intervals, pending or missing), is on the indicator's pane, follows it to another one, and goes when the indicator is removed. Its prices are on the indicator's price scale (e.g. its own left or overlay scale), while the indicator is on the drawing's pane; else on the pane's main scale. The magnet only snaps drawings on the price pane's main scale.
locked?
optionallocked?:boolean
Defined in: packages/core/src/drawing/types.ts:122
name?
optionalname?:string
Defined in: packages/core/src/drawing/types.ts:163
Name the user gave the drawing, e.g. in an object list; tools do not draw it.
pane
pane:
number
Defined in: packages/core/src/drawing/types.ts:118
Index of the pane the drawing lives in.
persist?
optionalpersist?:boolean
Defined in: packages/core/src/drawing/types.ts:126
false leaves the drawing out of serialize(), e.g. for app-generated drawings. Default true.
points
points:
DrawingPoint[]
Defined in: packages/core/src/drawing/types.ts:119
selectable?
optionalselectable?:boolean
Defined in: packages/core/src/drawing/types.ts:124
false keeps the drawing out of hit testing: no selection, dragging or click events. Default true.
style
style:
DrawingStyle
Defined in: packages/core/src/drawing/types.ts:120
text?
optionaltext?:string
Defined in: packages/core/src/drawing/types.ts:121
type
type:
string
Defined in: packages/core/src/drawing/types.ts:116
visibleOn?
optionalvisibleOn?:IntervalRange[]
Defined in: packages/core/src/drawing/types.ts:155
Bar intervals the drawing shows on; on other intervals it is not drawn or hit-tested, like hidden. Missing means every interval. See DrawingManager.setVisibleOn.
zIndex?
optionalzIndex?:number
Defined in: packages/core/src/drawing/types.ts:147
Stacking layer within below and the other drawings: higher draws on top. Ties keep their order. Default 0.