Skip to content

Interface: BarOptions

Defined in: layers/bar.ts:7

Properties

base?

ts
optional base?: number | ArrayLike<number>;

Defined in: layers/bar.ts:13

Baseline(s). Number or per-bar array — pass cumulative values to stack.


color?

ts
optional color?: string | Color;

Defined in: layers/bar.ts:24


colors?

ts
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?

ts
optional name?: string;

Defined in: layers/bar.ts:32


offset?

ts
optional offset?: number;

Defined in: layers/bar.ts:17

Shift bars by this many data units (use for grouped bars).


orientation?

ts
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?

ts
optional renderType?: RenderType;

Defined in: layers/bar.ts:31

Buffer-usage hint; set "dynamic" when streaming via setData. Default "static".


width?

ts
optional width?: number;

Defined in: layers/bar.ts:15

Bar width in data units. Defaults to 80% of the median spacing.


x

ts
x: ArrayLike<number>;

Defined in: layers/bar.ts:9

Bar center positions (data space).


y

ts
y: ArrayLike<number>;

Defined in: layers/bar.ts:11

Bar top values.


yAxis?

ts
optional yAxis?: string;

Defined in: layers/bar.ts:33

MIT licensed. WebGL2 required.