# KPI gauge grid (Trellis example)

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

Eight gauges from one definition, sharing the same bands.

- Chart type: `gauge` (Gauge)
- Collection: Trellis · Trellis
- Raw configuration: https://westcoast-charts.com/gallery-src/trellis/kpi-gauge-grid.js
- Standalone example: https://westcoast-charts.com/embed/samples/wcc/gallery/trellis/kpi-gauge-grid.html

## Setup

```js
import WestCoastCharts from 'west-coast-charts'
import types from 'west-coast-charts/types'
import trellis from 'west-coast-charts/features/trellis'

WestCoastCharts.use(types).use(trellis)
```

## Options

```js
const options = {
  chart: {
    height: "auto",
    fontFamily: "Inter, Geist, \"IBM Plex Sans\", system-ui, sans-serif",
    type: "gauge",
    toolbar: {
      show: false
    }
  },
  series: [
    {
      name: "Score",
      kpi: "Uptime",
      data: [60]
    },
    {
      name: "Score",
      kpi: "NPS",
      data: [55]
    },
    {
      name: "Score",
      kpi: "SLA",
      data: [85]
    },
    {
      name: "Score",
      kpi: "Coverage",
      data: [87]
    },
    {
      name: "Score",
      kpi: "Velocity",
      data: [70]
    },
    {
      name: "Score",
      kpi: "Quality",
      data: [57]
    },
    {
      name: "Score",
      kpi: "Budget",
      data: [74]
    },
    {
      name: "Score",
      kpi: "Hiring",
      data: [57]
    }
  ],
  labels: ["Score"],
  plotOptions: {
    radialBar: {
      startAngle: -110,
      endAngle: 110,
      bands: [
        {
          from: 0,
          to: 60,
          color: "#fecaca"
        },
        {
          from: 60,
          to: 85,
          color: "#fde68a"
        },
        {
          from: 85,
          to: 100,
          color: "#bbf7d0"
        }
      ],
      dataLabels: {
        name: {
          show: false
        }
      }
    }
  },
  trellis: {
    by: "kpi",
    columns: 4,
    aspectRatio: 1.2,
    legend: "none"
  },
  title: {
    text: "KPI scores"
  },
  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 trellis-kpi-gauge-grid.json --out trellis-kpi-gauge-grid.svg --with-table` (save the options above as JSON first)
