Chart style

Applies to every chart.

Palette

Theme

Appearance

Depth
Surface
Background

Reading & motion

Axis
Hover
Legend
Numbers
Loading
Empty
Using chart defaults

Docs

Install, API and guides

  • Getting started

Reference2

  • API reference
  • Motion & accessibility
API reference/Chart families

Vertical bars

Grouped and stacked bars on a shared zero baseline, with lines over the stack.

  • Bar
  • ChartPlot bars
  • stack

Use <ChartPlot bars> with a Bar for each series. Visible series form a group at each observation; one visible series produces single bars. Time and numeric spacing is preserved, including missing observations. Null values have no bar. Positive and negative bars share an exact zero baseline.

Bars share visibility, keyboard inspection, comparison, focus, live updates and lifecycle with line and area charts. The layout reserves space for edge groups. For categorical rankings, use the horizontal-bar component below. For vertical stacked bars, add stack and include one Bar per contribution. Series left out of stack.series draw as lines over the stack on the same scale, such as a target.

TypeScript

<ChartPlot bars height={280} inspectionSeries="revenue" tooltip={<Tooltip />}>
  <Grid pattern="dots" />
  <Bar series="revenue" />
  <Bar series="previous" />
  <XAxis />
  <YAxis showTicks={false} />
</ChartPlot>

TypeScript

<ChartPlot bars={{ segmentGap: 2 }} stack={{ series: ['online', 'retail'] }}>
  <Bar series="online" /><Bar series="retail" /><Line series="target" />
  <XAxis /><YAxis />
</ChartPlot>
PreviousAnimated numbersNextStacked area