Monthly recurring revenue
Pick a range and each point animates to its new value.
Show config
chart.data.labels = months.slice(-range); chart.data.datasets[0].data = mrr.slice(-range); chart.update(); // animates old points to new
Thirteen charts across the whole library, from pies to live data, each one colored by your theme.
13 charts
Pick a range and each point animates to its new value.
chart.data.labels = months.slice(-range); chart.data.datasets[0].data = mrr.slice(-range); chart.update(); // animates old points to new
248 accounts; a small plugin draws the total.
type: 'doughnut',
options: { cutout: '70%' },
plugins: [{ id: 'total', afterDraw(chart) {
// write the total at the center
} }]
One dot per account; the dashed line is the best fit.
datasets: [
{ type: 'scatter', data: points },
{ type: 'line', data: [fit(0), fit(40)], borderDash: [6, 5] },
]
Price across, margin up, bubble size is units sold.
type: 'bubble',
data: { datasets: [{
label: 'Plans',
data: [{ x: 16, y: 48, r: 18 }, ...], // r is in pixels
}] }
The chart reads the table beside it. Change a number and its bar follows.
| Month | Orders |
|---|---|
| April | |
| May | |
| June | |
| July | |
| August | |
| September | |
| Total | 2,823 |
const cells = table.querySelectorAll('input');
data: { datasets: [{ data: [...cells].map((c) => +c.value) }] }
table.addEventListener('input', () => { /* copy values */ chart.update(); });
Click a category to leave it out of the pie.
button.addEventListener('click', () => {
chart.toggleDataVisibility(index);
chart.update();
});
A new figure every 2 seconds; pauses when hidden.
9 orders a minute right now
setInterval(() => {
if (document.hidden) return;
chart.data.labels.push(now); chart.data.labels.shift();
chart.data.datasets[0].data.push(next); chart.data.datasets[0].data.shift();
chart.update();
}, 2000);
Hover a day for an HTML tooltip with each share.
scales: { x: { stacked: true }, y: { stacked: true } },
plugins: { tooltip: {
enabled: false,
external: ({ chart, tooltip }) => { /* fill and place a div */ },
} }
Six areas scored out of 100, this quarter over last.
type: 'radar',
options: { scales: { r: { suggestedMin: 50, suggestedMax: 100 } } }
A filled line, so each month's size reads first.
datasets: [{ data, fill: 'start', backgroundColor: (ctx) => {
const g = ctx.chart.ctx.createLinearGradient(0, top, 0, bottom);
g.addColorStop(0, faded); g.addColorStop(1, clear);
return g;
} }]
Tiny axis-free lines that sit under a number.
Five-star reviews
32
Returns
6
Support tickets
61
scales: { x: { display: false }, y: { display: false } },
plugins: { tooltip: { enabled: false } }
Like a pie, but each slice's radius carries the value.
type: 'polarArea',
options: { scales: { r: { ticks: { display: false } } } }
Bars for all orders, a line for repeat orders.
type: 'bar',
data: { datasets: [
{ type: 'bar', label: 'All orders', data: orders },
{ type: 'line', label: 'Repeat orders', data: repeat },
] }
Every chart here takes its colors from these eight tokens.
--basalt-series-1
--basalt-series-2
--basalt-series-3
--basalt-series-4
--basalt-series-5
--basalt-series-6
--basalt-series-7
--basalt-series-8