# Drilldown (Maps example)

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

plotOptions.map.drilldown: click the United States to open its states; the breadcrumb (or Escape) goes back. Right: the level is fetched on demand with load() (600 ms) and the drilldown event is logged.

- Chart composition: see the embedded example (2 charts)
- Collection: Maps · Maps
- Charts on the page: 2
- Standalone example: https://westcoast-charts.com/embed/samples/wcc/gallery/premium/maps/drilldown.html

## Setup

```js
import WestCoastCharts from 'west-coast-charts'
import types from 'west-coast-charts/types'
import premium from 'west-coast-charts/premium'
import 'west-coast-charts/maps/world' // registers the map shapes
import 'west-coast-charts/maps/us-states' // registers the map shapes

WestCoastCharts.use(types).use(premium)
const WestCoastChartsPremium = premium
WestCoastCharts.setLicenseKey(LICENCE_KEY) // paid production licence; localhost evaluation needs no key
```

## Options

This example builds its charts with page controls and helpers, so there is no single options object. Read the standalone example for the source.

## 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 maps-drilldown.json --out maps-drilldown.svg --with-table` (save the options above as JSON first)
