All charts
Seventeen components, grouped by the question they answer. Each page has a live example you can restyle, the source, and the shape of data it takes.
Comparison
| Component | Use it for | Data |
|---|---|---|
BarChart | Compare one value across a handful of categories. | { label: string; value: number; color?: string }[] |
HorizontalBarChart | Bars on their side, for long labels and ranked lists. | { label: string; value: number; color?: string }[] |
LollipopChart | A lighter bar chart: a stem and a dot per category. | { label: string; value: number; color?: string }[] |
WaterfallChart | Show how a starting balance becomes an ending one. | { label: string; value: number; total?: boolean; color?: string }[] |
FunnelChart | Track how many people make it through each stage. | { label: string; value: number; color?: string }[] |
Trends
| Component | Use it for | Data |
|---|---|---|
LineChart | A value moving through an ordered sequence. | { label: string; value: number; color?: string }[] |
StepChart | For values that hold steady and then jump. | { label: string; value: number; color?: string }[] |
AreaChart | A line with the volume underneath it filled in. | { label: string; value: number; color?: string }[] |
Parts of a whole
| Component | Use it for | Data |
|---|---|---|
PieChart | Share of a whole, best with three to five slices. | { label: string; value: number; color?: string }[] |
DonutChart | A pie with the middle cut out, so the labels have room. | { label: string; value: number; color?: string }[] |
TreemapChart | Nested rectangles sized by value, for many parts of a whole. | { label: string; value: number; color?: string }[] |
RadialChart | Progress toward a goal, drawn as concentric arcs. | { label: string; value: number; color?: string }[] |
Distribution
| Component | Use it for | Data |
|---|---|---|
Histogram | How a set of raw numbers is spread out. | number[] |
ScatterChart | Two measures per item, to spot clusters and outliers. | { x: number; y: number; label?: string }[] |
BubbleChart | A scatter plot where a third measure sets the size. | { x: number; y: number; size: number; label?: string }[] |
HeatmapChart | Intensity across two categories, such as day and time. | { x: string; y: string; value: number }[] |
RadarChart | Compare one subject across several dimensions at once. | { label: string; value: number; color?: string }[] |
The generic Chart component
Chart takes the same props as the others plus a type, which is handy when the kind of chart is decided at runtime.