Skip to content

charton API


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

Interface: CandleSeriesOptions ​

Defined in: packages/core/src/series.ts:1109

Options for a candle series (chart.addCandles): its style, the up and down colours of bodies, wicks and borders, labels and price scale placement.

Extends ​

Properties ​

animate ​

animate: boolean

Defined in: packages/core/src/series.ts:1161

Tween live updates of the forming bar instead of jumping. Ignored on static charts and while the chart's lowPower is on.


autoscale? ​

optional autoscale?: boolean | AutoscaleProvider

Defined in: packages/core/src/series.ts:272

How the series takes part in its price scale's autoscale. true (the default) fits its visible values, false leaves it out (it still draws, possibly off the pane), and a function adjusts the range it adds. Primitives attached to the series still add their own ranges.

Inherited from ​

PriceLineSeriesOptions.autoscale


axisTitle? ​

optional axisTitle?: boolean

Defined in: packages/core/src/series.ts:1159

Show the series title (e.g. the symbol) in a tag beside the last-value label.


baseLevel? ​

optional baseLevel?: BaseLevel

Defined in: packages/core/src/series.ts:1169

Where the baseline style splits its fills (default: the middle of the pane).


bodyRatio ​

bodyRatio: number

Defined in: packages/core/src/series.ts:1138


borders? ​

optional borders?: boolean

Defined in: packages/core/src/series.ts:1125

Draw the body outlines set by the border colours. Default true; hollow candles keep their outline.


boxSize? ​

optional boxSize?: number

Defined in: packages/core/src/series.ts:1176

pointFigure style: the price height of one box, overriding the box size the bars carry (PriceBar.boxSize, set by PriceBarBuilder). Bars made elsewhere carry none; without this option the series then reads it from them, as the step from one column's last box to the next column's first.


colorByPreviousClose? ​

optional colorByPreviousClose?: boolean

Defined in: packages/core/src/series.ts:1127

Colour bars by change from the previous close instead of from the open.


downBorderColor? ​

optional downBorderColor?: string

Defined in: packages/core/src/series.ts:1121


downColor? ​

optional downColor?: string

Defined in: packages/core/src/series.ts:1115


downWickColor? ​

optional downWickColor?: string

Defined in: packages/core/src/series.ts:1118


hollowDown? ​

optional hollowDown?: boolean

Defined in: packages/core/src/series.ts:1133

Draw falling bodies as outlines in the candles, heikinAshi and volumeCandles styles, so rising and falling bars differ in shape, not only in colour. Default false.


lastPointPulse? ​

optional lastPointPulse?: LastPointPulse

Defined in: packages/core/src/series.ts:1183

A pulse on the last point of the line, area, step and baseline styles (default 'off'): 'on-update' rings once per live update, 'continuous' keeps ringing. See LastPointPulseOptions. Needs the lastPointPulse() plugin; without it the option draws nothing.


lastValueLabel ​

lastValueLabel: boolean

Defined in: packages/core/src/series.ts:1157


legend? ​

optional legend?: boolean

Defined in: packages/core/src/series.ts:1112

false leaves this series out of the legend. Default true.


lineStyle? ​

optional lineStyle?: LineStyle

Defined in: packages/core/src/series.ts:1146

Dash of the line-drawn styles (line, lineMarkers, step, area, baseline and the close line of rangeBand). Default 'solid'.


lineWidth ​

lineWidth: number

Defined in: packages/core/src/series.ts:1141


offscreenLastPrice? ​

optional offscreenLastPrice?: "hidden" | "hollow"

Defined in: packages/core/src/series.ts:283

The last-value label when the newest bar is panned off screen: 'hollow' draws it as an outline, 'hidden' leaves it out. Unset keeps it as is.

Inherited from ​

PriceLineSeriesOptions.offscreenLastPrice


overlay? ​

optional overlay?: OverlayMargins

Defined in: packages/core/src/series.ts:1162


precision? ​

optional precision?: number

Defined in: packages/core/src/series.ts:1135

Fixed price decimals; auto-detected from data when omitted. Ignored when priceFormat is set.


priceFormat? ​

optional priceFormat?: PriceFormat

Defined in: packages/core/src/series.ts:1137

How prices are shown, parsed and snapped (decimals, tick size, fractions...).


priceLine? ​

optional priceLine?: boolean | SeriesPriceLineOptions

Defined in: packages/core/src/series.ts:278

Price line across the plot: true for the default style, an object to style it, false for none. Separate from lastValueLabel. Default: on for the main candle series, off for the others.

Inherited from ​

PriceLineSeriesOptions.priceLine


priceScale? ​

optional priceScale?: string

Defined in: packages/core/src/series.ts:1167

Price scale id in the pane (default 'right'). 'left' shows a left axis; other ids are overlays until given a side. Ignored with overlay.


renderer? ​

optional renderer?: "canvas" | "gpu"

Defined in: packages/core/src/series.ts:1156

Where the line-drawn styles (line, lineMarkers, step, area, baseline and rangeBand) are drawn (default 'gpu'). 'gpu' draws their lines and fills with WebGL2, like the candle styles, so long histories and frequent redraws cost the CPU far less; they then draw below every series drawn on the canvas. 'canvas' strokes them with the 2D canvas, so zIndex orders them among other canvas series. The dots of lineMarkers and the base level of baseline stay on the canvas.


style ​

style: CandleStyle

Defined in: packages/core/src/series.ts:1113


thinBars? ​

optional thinBars?: boolean

Defined in: packages/core/src/series.ts:1140

One-pixel strokes for bars / hlcBars at any zoom (default); false thickens them as bars widen.


title ​

title: string

Defined in: packages/core/src/series.ts:1110


upBorderColor? ​

optional upBorderColor?: string

Defined in: packages/core/src/series.ts:1120

Body outline colours of the candle styles; default to the theme's upBorder / downBorder, else no separate outline.


upColor? ​

optional upColor?: string

Defined in: packages/core/src/series.ts:1114


upWickColor? ​

optional upWickColor?: string

Defined in: packages/core/src/series.ts:1117

Wick colours of the candle styles; default to the theme's upWick / downWick, then the body colours.


wicks? ​

optional wicks?: boolean

Defined in: packages/core/src/series.ts:1123

Draw wicks (candle styles). Default true.