Data table
Use it beside any chart as the 'Show as table' view, or on its own when people need exact figures. First column is left-aligned labels; the rest are right-aligned numbers; wide tables scroll sideways.
How to use it
Paste the toolkit from Get the code into your page first, then call the chart like this.
container.append(
dataTable(
['Month', 'Groceries', 'Housing', 'Total'],
[
['Jul 26', '£431', '£1,210', '£2,214'],
['Aug 26', '£402', '£1,210', '£2,180']
],
'Spending by month'
)
);Options
What you can pass to this chart.
head
Array of header strings. The first column is the row label.
rows
Array of arrays of cells (strings or numbers; null becomes empty).
caption
Optional third argument: a visible caption that names the table.
More charts like this
Other charts in the “At a glance” group.
Gauge
Progress against a budget or limit, with the state spelled out in words.
View chart →KPI tiles
Headline numbers with a change and a sparkline, plus a loading skeleton.
View chart →Word cloud
The words people use most, sized by how often they appear, with optional colour for rising and falling.
View chart →Want charts or dashboards like these in your own product?
Tell me what you are trying to see and I can help work out the right approach, from the data behind it to the screen in front of people.