Sparklines Arrive as a Chart Type in CanvasXpress
▶ Sparklines — trend strips with reference line and endpoint markers▶ Sparklines — win/loss bars with summary value
Edward Tufte called them "datawords": little, intense, word-sized graphics you read inline, at a glance, without the ceremony of a full chart. A sparkline strips away axes, gridlines, and legends and leaves just the shape of a trend. Stack a column of them — one per metric, one per stock, one per sensor — and you can scan a whole dashboard's worth of movement in seconds.
CanvasXpress now has a first-class Sparklines graph type. Hand it a multi-series dataset and it draws a stack of compact strips, one per series, each on its own scale, chrome stripped away so the shape is all you see.
new CanvasXpress("canvas", {
graphType: "Sparklines",
data: { /* several series over a shared time dimension */ }
});
That is the whole setup. CanvasXpress facets your data into one small panel per series, gives each panel its own y-scale so a flat series and a volatile one are each readable, and hides the axes, grid, and legend that would only clutter a dataword.
Free per-panel scales, because that is what a sparkline needs
A common mistake with small-multiples is forcing every panel onto a shared scale. Do that, and a series with small swings flatlines next to a series with large ones. Sparklines are about shape, so each strip gets its own y-range by default. Every trend reads clearly regardless of its neighbors' magnitudes.
Four knobs that match how people actually use sparklines
The Sparklines type ships with four sugar parameters, each one a single, obvious control:
sparklineType picks the mark. A trend line (the default), bar, filled area, or winloss — a row of equal-height up/down bars colored by sign, the classic "did we win or lose each period" strip.
{ graphType: "Sparklines", sparklineType: "winloss", data: {...} }
sparklineBaseline draws a faint reference rule behind each strip so you can see where the trend sits relative to something meaningful: mean, median, or a true zero baseline. Each rule is confined to its own panel, computed from that series alone — a series' line is compared to that series' own average, not a global one.
sparklineMarkers adds emphasis dots: endpoints (first and last points), minmax (the low and high), or all. These are the dots that let a reader instantly find where a series started, ended, peaked, and bottomed out, without any axis to measure against.
sparklineAggregate writes a summary value at the right edge of each strip — mean, median, or the last value. This is the number-at-the-end you see in a well-made sparkline table, turning each strip into "here is the shape, and here is the one figure that matters."
Put together, a dashboard-ready strip chart looks like this:
new CanvasXpress("canvas", {
graphType: "Sparklines",
sparklineType: "line",
sparklineBaseline: "mean",
sparklineMarkers: "endpoints",
sparklineAggregate: "last",
data: { /* your series */ }
});
One line per series, a faint mean rule in each, dots on the first and last points, and the latest value printed at the right — a compact, scannable overview of many trends at once.
Built on a renderer you already trust
Sparklines are not a bespoke, one-off drawing engine. They reuse CanvasXpress's established charting pipeline, which means they inherit everything that pipeline already does well: hover tooltips, saving to PNG with the chart's reproducible configuration embedded, PDF export, and accessibility support. The four parameters above don't introduce new drawing code either — they seed mechanisms CanvasXpress already has: faceting, free scales, reference lines, point and text annotations. The result is a chart type that arrived solid, because most of what it stands on has been in production for years.
Reachable by clicking, too
Because a feature isn't finished until a non-coder can reach it, all four sparkline controls are in the Customizer. Draw a Sparklines chart, open the Customizer, and you can switch the mark to an area, add a median baseline, or turn on min/max markers by clicking — no editing a config by hand. The type also appears in the chart-type list and the gallery, with worked examples you can copy.
Note the distinction
CanvasXpress has long supported tiny sparklines inside data-table cells. The new Sparklines graph type is a different, complementary thing: a standalone chart made entirely of small-multiple strips. If you want a trend tucked into a table cell, that still works; if you want a dedicated panel of stacked datawords, that is what the Sparklines type is for.
Try it today
If you track many series and want to see all of their shapes at once — KPIs, prices, readings, test results over time — the Sparklines type is available now. Set graphType: "Sparklines", add the two or three sugar params that fit your story, and you have a Tufte-style dataword panel with tooltips, export, and reproducibility built in.