Alluvial
Plan changes across three yearly snapshots; stage labels above the columns.
Open the chart without page chrome ↗Drawing width at least 900 px. Scroll within the chart on smaller screens.
const options = {
chart: {
height: 420,
toolbar: {
show: false
},
type: "sankey"
},
series: [
{
data: [
{
stage: 0,
from: "Free",
to: "Free",
value: 173
},
{
stage: 0,
from: "Free",
to: "Pro",
value: 38
},
{
stage: 0,
from: "Free",
to: "Team",
value: 47
},
{
stage: 0,
from: "Free",
to: "Churned",
value: 73
},
{
stage: 0,
from: "Pro",
to: "Free",
value: 68
},
{
stage: 0,
from: "Pro",
to: "Pro",
value: 218
},
{
stage: 0,
from: "Pro",
to: "Team",
value: 53
},
{
stage: 0,
from: "Pro",
to: "Churned",
value: 65
},
{
stage: 0,
from: "Team",
to: "Free",
value: 54
},
{
stage: 0,
from: "Team",
to: "Pro",
value: 77
},
{
stage: 0,
from: "Team",
to: "Team",
value: 168
},
{
stage: 0,
from: "Team",
to: "Churned",
value: 72
},
{
stage: 0,
from: "Churned",
to: "Free",
value: 72
},
{
stage: 0,
from: "Churned",
to: "Churned",
value: 60
},
{
stage: 1,
from: "Free",
to: "Free",
value: 211
},
{
stage: 1,
from: "Free",
to: "Pro",
value: 38
},
{
stage: 1,
from: "Free",
to: "Team",
value: 31
},
{
stage: 1,
from: "Free",
to: "Churned",
value: 42
},
{
stage: 1,
from: "Pro",
to: "Free",
value: 28
},
{
stage: 1,
from: "Pro",
to: "Pro",
value: 242
},
{
stage: 1,
from: "Pro",
to: "Team",
value: 41
},
{
stage: 1,
from: "Pro",
to: "Churned",
value: 30
},
{
stage: 1,
from: "Team",
to: "Free",
value: 23
},
{
stage: 1,
from: "Team",
to: "Pro",
value: 54
},
{
stage: 1,
from: "Team",
to: "Team",
value: 61
},
{
stage: 1,
from: "Team",
to: "Churned",
value: 55
},
{
stage: 1,
from: "Churned",
to: "Free",
value: 70
},
{
stage: 1,
from: "Churned",
to: "Churned",
value: 84
}
]
}
],
plotOptions: {
sankey: {
alluvial: {
enabled: true,
stages: ["2024", "2025", "2026"]
},
nodeWidth: 10,
nodes: [
{
id: "Churned",
color: "#94a3b8"
}
]
}
},
theme: {
mode: "light",
preset: "coastal"
}
}
const chart = new WestCoastCharts(document.querySelector('#chart'), options)
chart.render()import WestCoastCharts from 'west-coast-charts'
import types from 'west-coast-charts/types'
import premium from 'west-coast-charts/premium'
WestCoastCharts.use(types).use(premium)
const WestCoastChartsPremium = premium
WestCoastCharts.setLicenseKey(LICENCE_KEY) // paid production licence; localhost evaluation needs no key
const options = {
chart: {
height: 420,
toolbar: {
show: false
},
type: "sankey"
},
series: [
{
data: [
{
stage: 0,
from: "Free",
to: "Free",
value: 173
},
{
stage: 0,
from: "Free",
to: "Pro",
value: 38
},
{
stage: 0,
from: "Free",
to: "Team",
value: 47
},
{
stage: 0,
from: "Free",
to: "Churned",
value: 73
},
{
stage: 0,
from: "Pro",
to: "Free",
value: 68
},
{
stage: 0,
from: "Pro",
to: "Pro",
value: 218
},
{
stage: 0,
from: "Pro",
to: "Team",
value: 53
},
{
stage: 0,
from: "Pro",
to: "Churned",
value: 65
},
{
stage: 0,
from: "Team",
to: "Free",
value: 54
},
{
stage: 0,
from: "Team",
to: "Pro",
value: 77
},
{
stage: 0,
from: "Team",
to: "Team",
value: 168
},
{
stage: 0,
from: "Team",
to: "Churned",
value: 72
},
{
stage: 0,
from: "Churned",
to: "Free",
value: 72
},
{
stage: 0,
from: "Churned",
to: "Churned",
value: 60
},
{
stage: 1,
from: "Free",
to: "Free",
value: 211
},
{
stage: 1,
from: "Free",
to: "Pro",
value: 38
},
{
stage: 1,
from: "Free",
to: "Team",
value: 31
},
{
stage: 1,
from: "Free",
to: "Churned",
value: 42
},
{
stage: 1,
from: "Pro",
to: "Free",
value: 28
},
{
stage: 1,
from: "Pro",
to: "Pro",
value: 242
},
{
stage: 1,
from: "Pro",
to: "Team",
value: 41
},
{
stage: 1,
from: "Pro",
to: "Churned",
value: 30
},
{
stage: 1,
from: "Team",
to: "Free",
value: 23
},
{
stage: 1,
from: "Team",
to: "Pro",
value: 54
},
{
stage: 1,
from: "Team",
to: "Team",
value: 61
},
{
stage: 1,
from: "Team",
to: "Churned",
value: 55
},
{
stage: 1,
from: "Churned",
to: "Free",
value: 70
},
{
stage: 1,
from: "Churned",
to: "Churned",
value: 84
}
]
}
],
plotOptions: {
sankey: {
alluvial: {
enabled: true,
stages: ["2024", "2025", "2026"]
},
nodeWidth: 10,
nodes: [
{
id: "Churned",
color: "#94a3b8"
}
]
}
},
theme: {
mode: "light",
preset: "coastal"
}
}
const chart = new WestCoastCharts(document.querySelector('#chart'), options)
await chart.render() Waiting for the chart.
Open Data & agent view to read this chart through chart.describe().
Read from the running library through its optional agent/describe module. Text, table and JSON share the same snapshot. Demo data only.
$ wcc chart export sankey-alluvial.json --out sankey-alluvial.svg --with-table Public agent tools 0.2.3, tested with Library 1.1.5; available from the versioned GitHub release and npm. Save a JSON spec first and check the loaded runtime and supported modules before rendering. Command reference
Loading /gallery/sankey/alluvial/index.md … This example uses Premium modules. Compare licences · Embedding in a distributed product?