Skip to content

charton API


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

Interface: DrawingStyle ​

Defined in: packages/core/src/drawing/types.ts:27

Look of a drawing: colors, line, fill and text, levels, line extensions, and which labels and stats show.

Properties ​

angle? ​

optional angle?: number

Defined in: packages/core/src/drawing/types.ts:87

Rotation in degrees, clockwise, of tools drawn at a fixed angle such as emoji (default 0).


bold? ​

optional bold?: boolean

Defined in: packages/core/src/drawing/types.ts:69


color? ​

optional color?: string

Defined in: packages/core/src/drawing/types.ts:28


deviation? ​

optional deviation?: number

Defined in: packages/core/src/drawing/types.ts:79

Distance of the outer lines from the centre line in standard deviations: a regression channel's (default 2) or an anchored VWAP's bands (default 0, no bands).


extendLeft? ​

optional extendLeft?: boolean

Defined in: packages/core/src/drawing/types.ts:39

Extend lines past their left anchor to the pane edge.


extendRight? ​

optional extendRight?: boolean

Defined in: packages/core/src/drawing/types.ts:41

Extend lines (or level lines) past their right anchor to the pane edge.


fill? ​

optional fill?: string

Defined in: packages/core/src/drawing/types.ts:31


fontSize? ​

optional fontSize?: number

Defined in: packages/core/src/drawing/types.ts:32


italic? ​

optional italic?: boolean

Defined in: packages/core/src/drawing/types.ts:70


labelContent? ​

optional labelContent?: "level" | "percent" | "price" | "both"

Defined in: packages/core/src/drawing/types.ts:60

What a level tool's labels show: the level ('level'), its price ('price'), the level with the price in brackets ('both'), or the level as a percent of the move ('percent', 0.618 shows 61.8%). Labels that mark a time or a radius have no price and show the level for 'price' and 'both'. Unset, the Fib retracement and extension show 'both' and the other level tools 'level'.


labelSide? ​

optional labelSide?: "left" | "right"

Defined in: packages/core/src/drawing/types.ts:51

Side of a level tool's lines or box its labels sit on, on screen. The Fib retracement, extension and channel label left of their lines unless 'right'; the Gann box and squares and the Fib speed resistance fan put their price labels beside the box's right edge unless 'left'; the Fib time zone and trend-based Fib time label right of each line unless 'left'.


levels? ​

optional levels?: DrawingLevel[]

Defined in: packages/core/src/drawing/types.ts:37

Levels of level-based tools; Fibonacci tools default to 0, 0.236, …, 0.786, 1, colored by the shared level rule (levelColor), with 0.618 in the theme's accent.


lineStyle? ​

optional lineStyle?: "solid" | "dashed" | "dotted"

Defined in: packages/core/src/drawing/types.ts:30


lineWidth? ​

optional lineWidth?: number

Defined in: packages/core/src/drawing/types.ts:29


lossColor? ​

optional lossColor?: string

Defined in: packages/core/src/drawing/types.ts:66

Color of a position's zone and label on the losing side (default the theme's down).


middleLine? ​

optional middleLine?: boolean

Defined in: packages/core/src/drawing/types.ts:74

Draw the dashed middle line of a parallel channel (default true).


profileWidth? ​

optional profileWidth?: number

Defined in: packages/core/src/drawing/types.ts:85

Length of a volume profile's longest row, in percent of the range width (default 50, so it ends at the middle).


profitColor? ​

optional profitColor?: string

Defined in: packages/core/src/drawing/types.ts:64

Color of a position's zone and label on the profitable side (default the theme's up).


rows? ​

optional rows?: number

Defined in: packages/core/src/drawing/types.ts:81

Price rows of a fixed-range volume profile; unset or 0 follows its height on screen, one row per 10 css px.


showFill? ​

optional showFill?: boolean

Defined in: packages/core/src/drawing/types.ts:68

false turns off the background a tool fills (its bands, zone or tint, and fill with them); default true.


showLabel? ​

optional showLabel?: boolean

Defined in: packages/core/src/drawing/types.ts:43

Show the tool's label (price, level, name).


showStats? ​

optional showStats?: boolean

Defined in: packages/core/src/drawing/types.ts:62

Show measurements such as price change, percent, bars and angle.


textColor? ​

optional textColor?: string

Defined in: packages/core/src/drawing/types.ts:72

Text color when it differs from the line color.


valueArea? ​

optional valueArea?: number

Defined in: packages/core/src/drawing/types.ts:83

Share of a volume profile's volume inside its value area, in percent (default 70).