# Honeycomb (Heatmap example)

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

Hexagonal cells in offset rows.

Why it matters: hexagon/circle/diamond cell shapes as a heatmap option, offset rows, labels with contrast-checked ink

- Chart type: `heatmap` (Heatmap)
- Collection: Heatmap · Heatmap
- Raw configuration: https://westcoast-charts.com/gallery-src/heatmap/honeycomb.js
- Standalone example: https://westcoast-charts.com/embed/samples/wcc/gallery/heatmap/honeycomb.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: "R1",
      data: [
        {
          x: "C1",
          y: 56
        },
        {
          x: "C2",
          y: 69
        },
        {
          x: "C3",
          y: 82
        },
        {
          x: "C4",
          y: 89
        },
        {
          x: "C5",
          y: 93
        },
        {
          x: "C6",
          y: 92
        },
        {
          x: "C7",
          y: 88
        },
        {
          x: "C8",
          y: 89
        },
        {
          x: "C9",
          y: 73
        },
        {
          x: "C10",
          y: 56
        },
        {
          x: "C11",
          y: 47
        },
        {
          x: "C12",
          y: 32
        },
        {
          x: "C13",
          y: 20
        },
        {
          x: "C14",
          y: 22
        }
      ]
    },
    {
      name: "R2",
      data: [
        {
          x: "C1",
          y: 73
        },
        {
          x: "C2",
          y: 83
        },
        {
          x: "C3",
          y: 96
        },
        {
          x: "C4",
          y: 93
        },
        {
          x: "C5",
          y: 94
        },
        {
          x: "C6",
          y: 87
        },
        {
          x: "C7",
          y: 81
        },
        {
          x: "C8",
          y: 70
        },
        {
          x: "C9",
          y: 57
        },
        {
          x: "C10",
          y: 43
        },
        {
          x: "C11",
          y: 33
        },
        {
          x: "C12",
          y: 17
        },
        {
          x: "C13",
          y: 16
        },
        {
          x: "C14",
          y: 15
        }
      ]
    },
    {
      name: "R3",
      data: [
        {
          x: "C1",
          y: 86
        },
        {
          x: "C2",
          y: 94
        },
        {
          x: "C3",
          y: 96
        },
        {
          x: "C4",
          y: 90
        },
        {
          x: "C5",
          y: 80
        },
        {
          x: "C6",
          y: 77
        },
        {
          x: "C7",
          y: 65
        },
        {
          x: "C8",
          y: 51
        },
        {
          x: "C9",
          y: 39
        },
        {
          x: "C10",
          y: 21
        },
        {
          x: "C11",
          y: 21
        },
        {
          x: "C12",
          y: 15
        },
        {
          x: "C13",
          y: 20
        },
        {
          x: "C14",
          y: 23
        }
      ]
    },
    {
      name: "R4",
      data: [
        {
          x: "C1",
          y: 94
        },
        {
          x: "C2",
          y: 92
        },
        {
          x: "C3",
          y: 86
        },
        {
          x: "C4",
          y: 77
        },
        {
          x: "C5",
          y: 72
        },
        {
          x: "C6",
          y: 51
        },
        {
          x: "C7",
          y: 37
        },
        {
          x: "C8",
          y: 27
        },
        {
          x: "C9",
          y: 17
        },
        {
          x: "C10",
          y: 15
        },
        {
          x: "C11",
          y: 11
        },
        {
          x: "C12",
          y: 17
        },
        {
          x: "C13",
          y: 28
        },
        {
          x: "C14",
          y: 34
        }
      ]
    },
    {
      name: "R5",
      data: [
        {
          x: "C1",
          y: 90
        },
        {
          x: "C2",
          y: 83
        },
        {
          x: "C3",
          y: 77
        },
        {
          x: "C4",
          y: 57
        },
        {
          x: "C5",
          y: 46
        },
        {
          x: "C6",
          y: 39
        },
        {
          x: "C7",
          y: 28
        },
        {
          x: "C8",
          y: 20
        },
        {
          x: "C9",
          y: 15
        },
        {
          x: "C10",
          y: 12
        },
        {
          x: "C11",
          y: 27
        },
        {
          x: "C12",
          y: 31
        },
        {
          x: "C13",
          y: 39
        },
        {
          x: "C14",
          y: 57
        }
      ]
    },
    {
      name: "R6",
      data: [
        {
          x: "C1",
          y: 78
        },
        {
          x: "C2",
          y: 70
        },
        {
          x: "C3",
          y: 58
        },
        {
          x: "C4",
          y: 37
        },
        {
          x: "C5",
          y: 29
        },
        {
          x: "C6",
          y: 24
        },
        {
          x: "C7",
          y: 19
        },
        {
          x: "C8",
          y: 19
        },
        {
          x: "C9",
          y: 18
        },
        {
          x: "C10",
          y: 29
        },
        {
          x: "C11",
          y: 34
        },
        {
          x: "C12",
          y: 47
        },
        {
          x: "C13",
          y: 63
        },
        {
          x: "C14",
          y: 75
        }
      ]
    },
    {
      name: "R7",
      data: [
        {
          x: "C1",
          y: 57
        },
        {
          x: "C2",
          y: 50
        },
        {
          x: "C3",
          y: 36
        },
        {
          x: "C4",
          y: 21
        },
        {
          x: "C5",
          y: 15
        },
        {
          x: "C6",
          y: 18
        },
        {
          x: "C7",
          y: 14
        },
        {
          x: "C8",
          y: 21
        },
        {
          x: "C9",
          y: 33
        },
        {
          x: "C10",
          y: 41
        },
        {
          x: "C11",
          y: 61
        },
        {
          x: "C12",
          y: 66
        },
        {
          x: "C13",
          y: 79
        },
        {
          x: "C14",
          y: 88
        }
      ]
    },
    {
      name: "R8",
      data: [
        {
          x: "C1",
          y: 43
        },
        {
          x: "C2",
          y: 33
        },
        {
          x: "C3",
          y: 24
        },
        {
          x: "C4",
          y: 18
        },
        {
          x: "C5",
          y: 15
        },
        {
          x: "C6",
          y: 22
        },
        {
          x: "C7",
          y: 27
        },
        {
          x: "C8",
          y: 38
        },
        {
          x: "C9",
          y: 54
        },
        {
          x: "C10",
          y: 59
        },
        {
          x: "C11",
          y: 77
        },
        {
          x: "C12",
          y: 90
        },
        {
          x: "C13",
          y: 90
        },
        {
          x: "C14",
          y: 92
        }
      ]
    }
  ],
  plotOptions: {
    heatmap: {
      shape: "hexagon"
    }
  },
  colors: ["#0d9488"],
  dataLabels: {
    enabled: false
  },
  title: {
    text: "Sensor grid, honeycomb"
  },
  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-honeycomb.json --out heatmap-honeycomb.svg --with-table` (save the options above as JSON first)
