Skip to content

charton API


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

Interface: HistogramSeriesOptions ​

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

Options for a histogram series (chart.addHistogram): column colours and base value, an optional mapping from the main series (such as volume), grouping, labels and price scale placement.

Extends ​

Properties ​

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:2352

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


base ​

base: number

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


color? ​

optional color?: string

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


columnRatio ​

columnRatio: number

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


follow? ​

optional follow?: FollowMapper<ValuePoint>

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

Derive the series from the main series: called with each main bar, the one before it and the theme; return a point, or null for none. The chart keeps it in step on loads, history pages, symbol switches, live bars and theme changes. See volumeOf.


format ​

format: (value) => string

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

Parameters ​

value ​

number

Returns ​

string


groupBy? ​

optional groupBy?: "last" | "max" | "sum"

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

How a column stands for several points when the chart groups bars (grouping option): their 'sum' (default, for volume-like data), the 'max' or the 'last'. Its colour is the last point's.


lastValueLabel ​

lastValueLabel: boolean

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


legend? ​

optional legend?: boolean

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

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


negativeColor? ​

optional negativeColor?: string

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


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:2353


positiveColor? ​

optional positiveColor?: string

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

Colors by sign relative to base; per-point color wins.


priceFormat? ​

optional priceFormat?: PriceFormat

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

Overrides format for labels, and gives the pane its tick size and axis unit.


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:2358

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


title ​

title: string

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