Interface: BarOptions
Defined in: layers/bar.ts:7
Properties
base?
optional base?: number | ArrayLike<number>;Defined in: layers/bar.ts:13
Baseline(s). Number or per-bar array — pass cumulative values to stack.
color?
optional color?: string | Color;Defined in: layers/bar.ts:24
colors?
optional colors?: (string | Color)[];Defined in: layers/bar.ts:29
Per-bar colors (overrides color). Handy for tinting each bar — e.g. volume bars green/red by the candle's direction. Length should match x.
name?
optional name?: string;Defined in: layers/bar.ts:32
offset?
optional offset?: number;Defined in: layers/bar.ts:17
Shift bars by this many data units (use for grouped bars).
orientation?
optional orientation?: "v" | "h";Defined in: layers/bar.ts:23
"v" (default) draws vertical bars: x positions along the x axis, y values along the y axis. "h" draws horizontal bars: x positions along the y axis, y values along the x axis, width is the bar thickness.
renderType?
optional renderType?: RenderType;Defined in: layers/bar.ts:31
Buffer-usage hint; set "dynamic" when streaming via setData. Default "static".
width?
optional width?: number;Defined in: layers/bar.ts:15
Bar width in data units. Defaults to 80% of the median spacing.
x
x: ArrayLike<number>;Defined in: layers/bar.ts:9
Bar center positions (data space).
y
y: ArrayLike<number>;Defined in: layers/bar.ts:11
Bar top values.
yAxis?
optional yAxis?: string;Defined in: layers/bar.ts:33