# One colour per row (Heatmap example)

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

Each metric row gets its own colour ramp.

- Chart type: `heatmap` (Heatmap)
- Collection: Heatmap · Heatmap
- Raw configuration: https://westcoast-charts.com/gallery-src/heatmap/multiple-color.js
- Standalone example: https://westcoast-charts.com/embed/samples/wcc/gallery/heatmap/multiple-color.html

## Setup

```js
import WestCoastCharts from 'west-coast-charts'
```

## Options

```js
const options = {
  chart: {
    height: 380,
    fontFamily: "Inter, Geist, \"IBM Plex Sans\", system-ui, sans-serif",
    type: "heatmap",
    toolbar: {
      show: false
    }
  },
  series: [
    {
      name: "CPU",
      data: [
        {
          x: "Node 1",
          y: 45
        },
        {
          x: "Node 2",
          y: 18
        },
        {
          x: "Node 3",
          y: 31
        },
        {
          x: "Node 4",
          y: 47
        },
        {
          x: "Node 5",
          y: 17
        },
        {
          x: "Node 6",
          y: 36
        },
        {
          x: "Node 7",
          y: 50
        },
        {
          x: "Node 8",
          y: 18
        },
        {
          x: "Node 9",
          y: 72
        },
        {
          x: "Node 10",
          y: 6
        },
        {
          x: "Node 11",
          y: 23
        },
        {
          x: "Node 12",
          y: 60
        },
        {
          x: "Node 13",
          y: 55
        },
        {
          x: "Node 14",
          y: 70
        },
        {
          x: "Node 15",
          y: 78
        },
        {
          x: "Node 16",
          y: 51
        }
      ]
    },
    {
      name: "Memory",
      data: [
        {
          x: "Node 1",
          y: 27
        },
        {
          x: "Node 2",
          y: 73
        },
        {
          x: "Node 3",
          y: 13
        },
        {
          x: "Node 4",
          y: 16
        },
        {
          x: "Node 5",
          y: 75
        },
        {
          x: "Node 6",
          y: 72
        },
        {
          x: "Node 7",
          y: 92
        },
        {
          x: "Node 8",
          y: 89
        },
        {
          x: "Node 9",
          y: 72
        },
        {
          x: "Node 10",
          y: 25
        },
        {
          x: "Node 11",
          y: 33
        },
        {
          x: "Node 12",
          y: 75
        },
        {
          x: "Node 13",
          y: 29
        },
        {
          x: "Node 14",
          y: 66
        },
        {
          x: "Node 15",
          y: 34
        },
        {
          x: "Node 16",
          y: 54
        }
      ]
    },
    {
      name: "Disk",
      data: [
        {
          x: "Node 1",
          y: 7
        },
        {
          x: "Node 2",
          y: 28
        },
        {
          x: "Node 3",
          y: 54
        },
        {
          x: "Node 4",
          y: 13
        },
        {
          x: "Node 5",
          y: 23
        },
        {
          x: "Node 6",
          y: 15
        },
        {
          x: "Node 7",
          y: 34
        },
        {
          x: "Node 8",
          y: 25
        },
        {
          x: "Node 9",
          y: 44
        },
        {
          x: "Node 10",
          y: 38
        },
        {
          x: "Node 11",
          y: 74
        },
        {
          x: "Node 12",
          y: 41
        },
        {
          x: "Node 13",
          y: 81
        },
        {
          x: "Node 14",
          y: 16
        },
        {
          x: "Node 15",
          y: 32
        },
        {
          x: "Node 16",
          y: 28
        }
      ]
    },
    {
      name: "Network",
      data: [
        {
          x: "Node 1",
          y: 77
        },
        {
          x: "Node 2",
          y: 21
        },
        {
          x: "Node 3",
          y: 18
        },
        {
          x: "Node 4",
          y: 45
        },
        {
          x: "Node 5",
          y: 35
        },
        {
          x: "Node 6",
          y: 70
        },
        {
          x: "Node 7",
          y: 49
        },
        {
          x: "Node 8",
          y: 68
        },
        {
          x: "Node 9",
          y: 52
        },
        {
          x: "Node 10",
          y: 93
        },
        {
          x: "Node 11",
          y: 30
        },
        {
          x: "Node 12",
          y: 10
        },
        {
          x: "Node 13",
          y: 8
        },
        {
          x: "Node 14",
          y: 74
        },
        {
          x: "Node 15",
          y: 7
        },
        {
          x: "Node 16",
          y: 50
        }
      ]
    }
  ],
  colors: ["#2563eb", "#0d9488", "#d97706", "#7c3aed"],
  plotOptions: {
    heatmap: {
      distributed: false
    }
  },
  dataLabels: {
    enabled: false
  },
  title: {
    text: "Cluster utilisation (%)"
  },
  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 heatmap-multiple-color.json --out heatmap-multiple-color.svg --with-table` (save the options above as JSON first)
