Streamgraph
Stacked flows with a soft, organic centerline.
Show code
new StackedArea('#chart', { stream: true, data: { x, series }, });
A JavaScript library for watercolor-style data visualizations.
Coffees poured this week. Tweak it →
Stacked flows with a soft, organic centerline.
new StackedArea('#chart', { stream: true, data: { x, series }, });
A single translucent wash under a hand-drawn edge.
new Area('#chart', { data: { x, y }, color: '#6f93c2', });
Honest uncertainty: the band literally looks blurry.
new Interval('#chart', { // a band you can see the doubt in data: { x, y, lo, hi }, color: '#6f93c2', });
Translucent washes over a hand-drawn web, two profiles compared.
new Radar('#chart', { data: { axes: ['Speed', 'Power', 'Range', …], series: [[7, 5, 8, …], [4, 8, 6, …]], }, seriesNames: ['Model A', 'Model B'], });
Bands stacked from a zero baseline, with a built-in legend.
new StackedArea('#chart', { data: { x, series: { Alpha, Beta, Gamma } }, colors: ['#dc8068', '#94a854', '#6f93c2'], });
Circles, callouts and highlight bands, on any chart, in data coords.
new Line('#chart', { data: { x, y }, annotations: [ { type: 'band', from: 3, to: 5, label: 'surge' }, { type: 'circle', at: [5, 60], r: 20 }, { type: 'callout', at: [1, 60], to: [5, 60], text: 'new high' }, ], });
A calendar heatmap, one wash per day, six months of it.
new Calendar('#chart', { data: { days: [{ date, value }, …] }, color: '#4ca85f', });
npm install watercolorviz d3
color, colors, ink,
paper, title, seed, width…):
import { Bar } from 'watercolorviz'; new Bar('#chart', { data: { labels: ['A', 'B', 'C'], values: [30, 55, 42] }, });
<script type="importmap"> { "imports": { "d3": "https://cdn.jsdelivr.net/npm/d3@7/+esm" } } </script> <div id="chart"></div> <script type="module"> import { Bar } from 'watercolorviz'; new Bar('#chart', { data: { labels: ['A', 'B'], values: [30, 55] } }); </script>