Charts

Bar chart

Columns that grow out of the baseline on a spring — grouped or stacked, thin with rounded caps, separated by 2px of air. Hover a category to lift it.

Paste it into ChatGPT, Claude, Cursor or v0.
series2

Usage

React
import { BarChart } from '@vizzele/react';

<BarChart
  title="Signups by channel"
  data={rows}
  index="week"
  series={[
    { key: 'organic', label: 'Organic' },
    { key: 'paid', label: 'Paid' },
  ]}
  stacked
/>

Props

PropTypeDefaultDescription
dataChartRow[]—One object per x position.
indexstring—Key holding the x value (category or date).
seriesChartSeries[]—{ key, label?, color? } — up to five, colored in the palette’s fixed order (never cycled).
titlestring—Accessible name and caption of the data table.
heightnumber260Plot height in px.
valueFormatter(v: number) => stringcompactFormats ticks, labels, tooltip and table (1,284 / 12.9K).
xFormatter(x) => string—Formats the x labels.
legendboolean≥ 2 seriesShow the legend.
yMaxnumber—Fix the top of the y scale.
stackedbooleanfalseStack instead of grouping side by side.
valueLabelsbooleantrueValue on each cap (single series, when there is room).

Accessibility

  • The plot is focusable: ←/→ walk the points (Home/End jump) and a polite live region reads each one.
  • Every value is also in a visually hidden <table>, so nothing is gated behind hover.
  • Identity never relies on color alone: legend for 2+ series, direct labels when they fit.
  • The palette is validated for color-vision deficiency and contrast in both themes.