Data Viz

Charts people can read, whoever they are. Seven palettes side by side with honest color check results, charts drawn in plain SVG with legends, keyboard tooltips, and a table of the data, and the same chart in five popular chart libraries, so each product picks the tools that fit.

Passes every access check in both modes. Two light colors sit under 3 to 1, so labels and the table view carry them. Prism's own, stepped separately for light and dark · Prism.

  • Passes Color blindness (access)
  • Passes Typical vision (access)
  • Labels needed Against the page (access)
  • Passes Even lightness (look)
  • Passes Color strength (look)

Checked in light mode for the first four colors, the most a Prism chart shows. Switch the site theme to see the other mode. Access checks decide whether people can tell series apart; look checks keep the set calm and even.

Pick the form first

The job of the data picks the chart. Sometimes the answer is a number, not a chart.

Compare amounts
Columns or bars, sorted when order does not matter. Start at zero.
Show change over time
A line. Up to four series; past that, small multiples.
Parts of a whole
Stacked columns over time, or one segmented bar. Not a pie: people compare lengths far better than angles.
One number that matters
A stat tile with its change and a small trend, not a chart.

Stat tiles

When one number matters, show the number, its change in words and an arrow, and a small trend.

Monthly revenue

$41,000

Up 14 percent vs last month

Visitors

16,700

Up 3 percent vs last month

Refund requests

23

Down 6 percent vs last month

ReadyReact, Next.js, Remix, Vite

import { StatTile } from "@prism-dsx/data-viz/react";

<StatTile label="Monthly revenue" value="$41,000" delta="14 percent" direction="up" period="vs last month"
  trend={[18, 21, 19, 24, 26, 25, 29, 31, 30, 34, 36, 41]} />

Column chart

Amounts by category. One series needs no legend; the title names it. Hover or tab to a column for its value.

Revenue by month

2026, in dollars

$0$20K$40K$60KJanFebMarAprMayJunJulAugSepOctNovDec

ReadyReact, Next.js, Remix, Vite

import { ColumnChart } from "@prism-dsx/data-viz/react";

<ColumnChart title="Revenue by month" subtitle="2026, in dollars" unit="$"
  data={[{"label":"Jan","value":18000},{"label":"Feb","value":21000},{"label":"Mar","value":19000}] /* ...12 months */} />

Line chart

Change over time, up to four series. A legend, labels at the line ends, and a crosshair that follows the pointer or the arrow keys.

Visitors by channel

Monthly visits, 2026

  • Search
  • Social
  • Email
02.5K5K7.5K10KJanMarMayJulSepNovDecSearchSocialEmail

ReadyReact, Next.js, Remix, Vite

import { LineChart } from "@prism-dsx/data-viz/react";

// Set the palette once on a wrapper: --series-1 to --series-8.
<div style={{ "--series-1": "#2a78d6", "--series-2": "#eb6834", "--series-3": "#1baf7a" }}>
  <LineChart
    title="Visitors by channel"
    labels={["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}
    series={[{"name":"Search","values":[4200,4500,4700,5100,5600,5900,6100,6500,6800,7200,7600,8100]},{"name":"Social","values":[2600,2900,3400,3300,3700,4100,4600,4400,4900,5200,5500,5300]},{"name":"Email","values":[1200,1300,1500,1700,1800,2100,2300,2500,2600,2900,3100,3300]}]}
  />
</div>
// Includes a legend, direct end labels, a keyboard crosshair (arrow keys), and a table view.

Stacked columns

Parts of a total across categories. A 2 pixel gap separates the parts, and the column's tooltip lists them all.

New orders by plan

2026, by quarter

  • Starter
  • Studio
  • Partner
0100200300400Q1Q2Q3Q4

ReadyReact, Next.js, Remix, Vite

import { StackedColumnChart } from "@prism-dsx/data-viz/react";

<StackedColumnChart title="New orders by plan" labels={["Q1","Q2","Q3","Q4"]}
  series={[{"name":"Starter","values":[120,140,150,170]},{"name":"Studio","values":[80,95,120,140]},{"name":"Partner","values":[20,26,31,40]}]} />

Segmented bar

One whole, split into parts. Easier to read than a pie, because people compare lengths better than angles.

Where visitors came from

Share of all visits, 2026

  • Search
  • Social
  • Email
  • Other
46%27%18%9%

ReadyReact, Next.js, Remix, Vite

import { SegmentedBar } from "@prism-dsx/data-viz/react";

<SegmentedBar title="Where visitors came from" parts={[{"name":"Search","value":46},{"name":"Social","value":27},{"name":"Email","value":18},{"name":"Other","value":9}]} />

Live in Recharts

Recharts is a free, MIT licensed chart library for React. These charts draw with it, using the same palette and the same rules: a title, a legend, keyboard tooltips, and a table view. It adds forms Prism's own set does not have yet, like area, horizontal bars, and scatter.

Visitors by channel

The same data as the Prism line chart

Visitors by channel. Search from 4,200 to 8,100; Social from 2,600 to 5,300; Email from 1,200 to 3,300.

ReadyReact apps, MIT licensed

<ResponsiveContainer width="100%" height={260}>
  <LineChart data={data} accessibilityLayer>
    <CartesianGrid vertical={false} />
    <XAxis dataKey="month" />
    <YAxis />
    <Tooltip />
    <Legend />
    <Line dataKey="Search" stroke="#2a78d6" strokeWidth={2} dot={false} />
    <Line dataKey="Social" stroke="#eb6834" strokeWidth={2} dot={false} />
    <Line dataKey="Email" stroke="#1baf7a" strokeWidth={2} dot={false} />
  </LineChart>
</ResponsiveContainer>

New orders by plan

Stacked area, 2026 by quarter

New orders by plan, stacked. Starter from 120 to 170; Studio from 80 to 140; Partner from 20 to 40.

ReadyReact apps, MIT licensed

<AreaChart data={data} accessibilityLayer>
  <CartesianGrid vertical={false} />
  <XAxis dataKey="quarter" />
  <YAxis />
  <Tooltip />
  <Legend />
  <Area dataKey="Starter" stackId="1" stroke="#2a78d6" fill="#2a78d6" fillOpacity={0.12} strokeWidth={2} />
  <Area dataKey="Studio" stackId="1" stroke="#eb6834" fill="#eb6834" fillOpacity={0.12} strokeWidth={2} />
  <Area dataKey="Partner" stackId="1" stroke="#1baf7a" fill="#1baf7a" fillOpacity={0.12} strokeWidth={2} />
</AreaChart>

Most visited pages

Horizontal bars, sorted, last 30 days

Most visited pages: Home 9,400, Pricing 6,100, Work 4,800, About 3,200, Contact 2,100.

ReadyReact apps, MIT licensed

<BarChart data={data} layout="vertical" accessibilityLayer>
  <CartesianGrid horizontal={false} />
  <XAxis type="number" />
  <YAxis type="category" dataKey="page" />
  <Tooltip />
  <Bar dataKey="views" fill="#2a78d6" barSize={20} radius={[0, 4, 4, 0]} />
</BarChart>

Visits and orders by client

Scatter, one dot per client

Visits and orders by client. More visits go with more orders, from 1,200 visits and 4 orders to 8,400 visits and 33 orders.

ReadyReact apps, MIT licensed

<ScatterChart accessibilityLayer>
  <CartesianGrid />
  <XAxis type="number" dataKey="visits" name="Visits" />
  <YAxis type="number" dataKey="orders" name="Orders" />
  <Tooltip />
  <Scatter data={data} fill="#2a78d6" />
</ScatterChart>

Licenses: Recharts and every package it brings are MIT, ISC, or BSD licensed. Their full texts are at licenses/charts.txt.

The same chart, six ways

The visitors line chart in Prism's own SVG and in five popular chart libraries, with the chosen palette. Whichever you pick, keep the rules below.

Chart libraries compared
LibraryLicenseGood for
Prism SVGPrismAny site, no library: plain SVG plus a table
Chart.jsMITCanvas charts for any site
RechartsMITReact apps
Apache EChartsApache 2.0Large data and dashboards
Observable PlotISCQuick, exploratory SVG charts
Vega-LiteBSD 3-ClauseCharts described as data, for tools and notebooks

ReadyAny site, no library: plain SVG plus a table

import { LineChart } from "@prism-dsx/data-viz/react";

// Set the palette once on a wrapper: --series-1 to --series-8.
<div style={{ "--series-1": "#2a78d6", "--series-2": "#eb6834", "--series-3": "#1baf7a" }}>
  <LineChart
    title="Visitors by channel"
    labels={["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}
    series={[{"name":"Search","values":[4200,4500,4700,5100,5600,5900,6100,6500,6800,7200,7600,8100]},{"name":"Social","values":[2600,2900,3400,3300,3700,4100,4600,4400,4900,5200,5500,5300]},{"name":"Email","values":[1200,1300,1500,1700,1800,2100,2300,2500,2600,2900,3100,3300]}]}
  />
</div>
// Includes a legend, direct end labels, a keyboard crosshair (arrow keys), and a table view.

Rules for every chart

Whatever the palette or the library, these hold.

  • Pick the form first, color last. The job of the data picks the chart.
  • Colors go to series in a fixed order and stay with the series. A filter never repaints what is left.
  • One y axis, always. Two measures of different scale get two charts.
  • Never more than about four colors at once. Fold the rest into Other, or use small multiples.
  • Text never wears a series color. Values and labels use the text colors; a colored mark beside them carries the identity.
  • Two or more series always get a legend, and direct labels when they do not collide.
  • Every chart has a title, a text summary for screen readers, and the data as a table.
  • Hover and keyboard focus show the same details. Nothing lives in a tooltip alone.
  • Thin marks: columns no wider than 24 pixels with a rounded end, 2 pixel lines, quiet gridlines.
  • Status colors (good, warning, error) are for status only, with an icon and a word, never for series.

Take Prism home

The palette as CSS, for light and dark.

ReadyAny website or chart library

/* Prism: Prism's own, stepped separately for light and dark (Prism). Assign in this order, never cycled. */
:root {
  --series-1: #2a78d6;
  --series-2: #eb6834;
  --series-3: #1baf7a;
  --series-4: #eda100;
  --series-5: #e87ba4;
  --series-6: #008300;
  --series-7: #6250d6;
  --series-8: #e34948;
}
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    --series-1: #3987e5;
    --series-2: #d95926;
    --series-3: #199e70;
    --series-4: #c98500;
    --series-5: #d55181;
    --series-6: #0ca30c;
    --series-7: #9085e9;
    --series-8: #e66767;
  }
}
:root[data-theme="dark"] {
  --series-1: #3987e5;
  --series-2: #d95926;
  --series-3: #199e70;
  --series-4: #c98500;
  --series-5: #d55181;
  --series-6: #0ca30c;
  --series-7: #9085e9;
  --series-8: #e66767;
}