# Node Customization (Sankey example)

> WestCoast Charts 1.1.5, release, public Core release, on npm. HTML: https://westcoast-charts.com/gallery/sankey/node-customization/ · Index for agents: https://westcoast-charts.com/llms.txt

Per-node colours, wider nodes, rounded corners and label formatting.

- Chart type: `sankey` (Sankey)
- Collection: Sankey · Sankey
- Raw configuration: https://westcoast-charts.com/gallery-src/sankey/node-customization.js
- Standalone example: https://westcoast-charts.com/embed/samples/wcc/gallery/premium/sankey/node-customization.html

## Setup

```js
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
```

## Options

```js
const options = {
  chart: {
    height: 400,
    toolbar: {
      show: false
    },
    type: "sankey"
  },
  series: [
    {
      data: [
        ["Applied", "Screened", 640],
        ["Screened", "Interviewed", 210],
        ["Screened", "Rejected", 430],
        ["Interviewed", "Offer", 48],
        ["Interviewed", "Rejected ", 162],
        ["Offer", "Hired", 41],
        ["Offer", "Declined", 7]
      ]
    }
  ],
  plotOptions: {
    sankey: {
      nodeWidth: 22,
      nodeBorderRadius: 6,
      nodePadding: 20,
      nodes: [
        {
          id: "Applied",
          color: "#64748b"
        },
        {
          id: "Hired",
          color: "#16a34a"
        },
        {
          id: "Rejected",
          color: "#e11d48"
        },
        {
          id: "Rejected ",
          color: "#e11d48"
        },
        {
          id: "Declined",
          color: "#f59e0b"
        }
      ],
      labels: {
        fontWeight: 700,
        formatter: (name) => name.trim().toUpperCase()
      }
    }
  },
  theme: {
    mode: "light",
    preset: "coastal"
  }
}

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

## Verify

- Text check (Library 1.1.5): load `west-coast-charts/agent/describe` and call `chart.describe({ format: "json" })` for the actual drawn state. The live reader is on this example’s HTML page.
- Command line (Public agent tools 0.2.3, tested with Library 1.1.5; available from the versioned GitHub release and npm, https://westcoast-charts.com/docs/cli/index.md): `wcc chart export sankey-node-customization.json --out sankey-node-customization.svg --with-table` (save the options above as JSON first)
