Node Overlapping
Thirty small sources into five buckets: nodes and labels stay apart.
Why it matters many small nodes in one column never overlap: padding shrinks before nodes do, minNodeHeight keeps tiny flows visible, labels avoid each other and the plot edge
Open the chart without page chrome ↗Drawing width at least 900 px. Scroll within the chart on smaller screens.
const options = {
chart: {
height: 620,
toolbar: {
show: false
},
type: "sankey"
},
series: [
{
data: [
["Store 1", "East", 120],
["Store 2", "West", 15],
["Store 3", "South", 25],
["Store 4", "South", 20],
["Store 5", "South", 5],
["Store 6", "East", 27],
["Store 7", "South", 21],
["Store 8", "North", 9],
["Store 9", "Online", 31],
["Store 10", "West", 5],
["Store 11", "South", 15],
["Store 12", "North", 7],
["Store 13", "West", 31],
["Store 14", "North", 3],
["Store 15", "East", 15],
["Store 16", "North", 12],
["Store 17", "West", 30],
["Store 18", "South", 7],
["Store 19", "Online", 5],
["Store 20", "West", 7],
["Store 21", "East", 2],
["Store 22", "West", 26],
["Store 23", "South", 4],
["Store 24", "South", 14],
["Store 25", "West", 2],
["Store 26", "East", 3],
["Store 27", "East", 13],
["Store 28", "East", 15],
["Store 29", "West", 24],
["Store 30", "South", 5]
]
}
],
plotOptions: {
sankey: {
nodePadding: 10,
minNodeHeight: 3
}
},
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: 620,
toolbar: {
show: false
},
type: "sankey"
},
series: [
{
data: [
["Store 1", "East", 120],
["Store 2", "West", 15],
["Store 3", "South", 25],
["Store 4", "South", 20],
["Store 5", "South", 5],
["Store 6", "East", 27],
["Store 7", "South", 21],
["Store 8", "North", 9],
["Store 9", "Online", 31],
["Store 10", "West", 5],
["Store 11", "South", 15],
["Store 12", "North", 7],
["Store 13", "West", 31],
["Store 14", "North", 3],
["Store 15", "East", 15],
["Store 16", "North", 12],
["Store 17", "West", 30],
["Store 18", "South", 7],
["Store 19", "Online", 5],
["Store 20", "West", 7],
["Store 21", "East", 2],
["Store 22", "West", 26],
["Store 23", "South", 4],
["Store 24", "South", 14],
["Store 25", "West", 2],
["Store 26", "East", 3],
["Store 27", "East", 13],
["Store 28", "East", 15],
["Store 29", "West", 24],
["Store 30", "South", 5]
]
}
],
plotOptions: {
sankey: {
nodePadding: 10,
minNodeHeight: 3
}
},
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-node-overlapping.json --out sankey-node-overlapping.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/node-overlapping/index.md … This example uses Premium modules. Compare licences · Embedding in a distributed product?