Basic Sankey

Where a household budget goes: income sources into spending categories.

Chart type
Sankey sankey
Tier
Premium
Collection
Sankey
Render
Live, site theme
View .md Agent setup
LIVE/sankey/basic-sankey1 of 23 in Sankey

Configuration

Raw Standalone
const options = {
  chart: {
    height: 420,
    toolbar: {
      show: false
    },
    type: "sankey"
  },
  series: [
    {
      name: "Budget",
      data: [
        ["Salary", "Household", 3900],
        ["Freelance", "Household", 850],
        ["Interest", "Household", 120],
        ["Household", "Housing", 1650],
        ["Household", "Food", 720],
        ["Household", "Transport", 380],
        ["Household", "Savings", 1300],
        ["Household", "Leisure", 520],
        ["Household", "Other", 300]
      ]
    }
  ],
  plotOptions: {
    sankey: {
      labels: {
        valueFormatter: (v) => '€' + v.toLocaleString('en')
      }
    }
  },
  theme: {
    mode: "light",
    preset: "coastal"
  }
}

const chart = new WestCoastCharts(document.querySelector('#chart'), options)
chart.render()

This example uses Premium modules. Compare licences · Embedding in a distributed product?