# Area highlight (Highlight & filter example)

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

Legend hover highlights one area.

- Chart type: `area` (Area)
- Collection: Highlight & filter · Highlight filter
- Raw configuration: https://westcoast-charts.com/gallery-src/highlight-filter/area-highlight.js
- Standalone example: https://westcoast-charts.com/embed/samples/wcc/gallery/highlight-filter/area-highlight.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: "area",
    toolbar: {
      show: false
    }
  },
  series: [
    {
      name: "North",
      data: [38, 36, 36, 38, 37, 40, 39, 41, 39, 42, 42, 40, 42, 42, 43, 45, 48, 49, 48, 50, 49, 51, 52, 54]
    },
    {
      name: "South",
      data: [43, 43, 45, 42, 42, 45, 45, 43, 44, 42, 44, 44, 44, 47, 49, 51, 53, 54, 54, 53, 52, 55, 54, 55]
    },
    {
      name: "East",
      data: [42, 45, 45, 43, 46, 47, 45, 46, 46, 48, 50, 51, 51, 54, 54, 52, 50, 48, 49, 46, 45, 44, 46, 49]
    }
  ],
  legend: {
    onItemHover: {
      highlightDataSeries: true
    }
  },
  fill: {
    opacity: 0.25
  },
  stroke: {
    width: 2
  },
  title: {
    text: "Energy use by grid zone"
  },
  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 highlight-filter-area-highlight.json --out highlight-filter-area-highlight.svg --with-table` (save the options above as JSON first)
