OptionalasOptionalaxisWhich <YAxis> (by its id) this layer scales against — the scale (as
picks the style). Omitted ⇒ the row's default axis. For a horizontal
histogram this is the bin (band) axis; for a vertical one the value
axis.
OptionalbinPer-bin colours for a single-series band chart — binColors[i] fills
bar i (aligned to the bins / bands in order), overriding the as/theme
fill. This is the way to colour heart-rate / power zones or value bands
each their own colour (the colors map above is per-group, for stacks).
An undefined/short entry falls back to the theme fill. Meant for a
single-series chart (column + bins, or a horizontal single series); on a
multi-group stack it would tint every segment of a bin alike, so it's not
the tool there.
OptionalbinsbyColumn bin records — Array<{ start, end, …aggregates }> from a
value-band aggregation
(series.byColumn('power', { width: 20 }, { seconds: … })). The value-axis
alternative to series: column / columns name the aggregate field(s) to
draw. Pair with ordinal for a category (band) axis.
OptionalcategoriesCategorical data — an ordered { label, value }[], one bar per category
on a first-class ordinal category x-axis (the container infers
xKind:'category' and builds a band scale over the labels). The transpose
view's "columns on x": each label is a category (ticker / account / zone),
value its bar height. Provide exactly one of series / bins /
categories; categories takes no column/columns and is vertical only
(categories on x). Colour per category via binColors. (Categorical-axis RFC,
Phase 1.)
OptionalcolorsPer-group colour override for a stacked chart — { group: cssColor }.
A segment resolves colors[group] ?? theme.bar[group]?.fill ?? theme.bar.default.fill, so named roles (e.g. a crit band styled in the
theme) come from the theme while ad-hoc groups (five hosts) take a colour
here without minting a theme role. The single styling channel still holds:
this is the stack's one colour input.
OptionalcolumnName of the numeric value column for the bar height (single series). Provide
column or columns, not both.
OptionalcolumnsStacked-segment columns, bottom → top — one segment per name. Use with a
wide series (e.g. pivotByGroup output) or with bins. Mutually
exclusive with column, and invalid with a Map series (there the segments
are the map's groups; use column).
OptionalgapPixel gap between adjacent bars / bins — the bar's key span is inset by this
total (half each side). Omitted ⇒ the theme's bar gap. A span the gap
would invert collapses to the style's minWidth.
OptionalidThe stable series identity for selection + hover — and it gates
interactivity (a bar layer is selectable/hoverable only when given an
id). For a stack, a clicked / hovered segment is identified by
(id, key = bin begin, label = group), so two segments in one bin don't both
light up.
Optional InternalindexDeclaration position among the <Layers> children, injected by
Layers so z-order follows JSX order. Do not set.
OptionalordinalFor bins: lay the bands out as uniform unit slots ([i, i+1]) instead
of their numeric [start, end] edges — an ordinal band axis where every band
reads the same width (heart-rate zones). Ignored for series.
OptionalorientationBar growth direction (the histogram orientation). Default 'vertical'.
'vertical' — bars grow up from a value baseline, bins on the x
axis (time buckets, value bands). The column / time-histogram look.'horizontal' — bars grow right, bins on the y axis (a band axis
like heart-rate zones). Label the bands with <YAxis ticks={[{ at, label }]}>.A 'horizontal' chart puts the value on the shared x axis, so its
container's x-kind is 'value' — it cannot share a <ChartContainer> with
time-series rows (each horizontal histogram stands alone). Vertical charts
have no such constraint. The in-chart flag / crosshair value cursor is
drawn for the single-series vertical case only; stacked and horizontal
charts read out via hover / click (onHover / onSelect).
OptionalseriesThe source series. Provide exactly one of series or bins.
TimeSeries (interval / timeRange-keyed is the primary form — each
event's key [begin, end] is a bar's x-span; a point-keyed series derives
its width from neighbour spacing) → single-series bars via column, or
stacked bars from a wide series via columns.ValueSeries (series.byValue('dist')) bars against its value axis.ReadonlyMap<group, TimeSeries> — one series per stack group, all on
the same bin grid, the shape
series.partitionBy('host', { groups }).aggregate(seq, m).toMap() returns.
Stacked bars, column names the shared value column, groups = map order.Live charts: series.byValue(…) / .toMap() mint fresh objects each
call, so an inline series={…} re-registers this layer every render — on a
frequently re-rendering chart, memoize the projection (useMemo).
The single series' semantic identifier — what the data is. The theme maps it to a BarStyle (
theme.bar[as] ?? theme.bar.default). Single series only — ignored (not an error) on a stacked chart, which colours its segments per group instead (seecolors).