# Arcs (Maps example)

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

Flight volumes from a hub; width follows the value, dashes show direction.

- Chart type: `map` (Map)
- Collection: Maps · Maps
- Raw configuration: https://westcoast-charts.com/gallery-src/maps/arcs.js
- Standalone example: https://westcoast-charts.com/embed/samples/wcc/gallery/premium/maps/arcs.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

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

## Options

```js
const options = {
  chart: {
    height: 480,
    toolbar: {
      show: false
    },
    type: "map"
  },
  series: [
    {
      name: "Flights / week",
      data: [
        {
          from: [13.4, 52.52],
          to: [-74, 40.7],
          value: 57,
          name: "Berlin → New York"
        },
        {
          from: [13.4, 52.52],
          to: [-0.13, 51.5],
          value: 48,
          name: "Berlin → London"
        },
        {
          from: [13.4, 52.52],
          to: [2.35, 48.86],
          value: 45,
          name: "Berlin → Paris"
        },
        {
          from: [13.4, 52.52],
          to: [139.69, 35.69],
          value: 54,
          name: "Berlin → Tokyo"
        },
        {
          from: [13.4, 52.52],
          to: [-118.24, 34.05],
          value: 52,
          name: "Berlin → Los Angeles"
        },
        {
          from: [13.4, 52.52],
          to: [103.82, 1.35],
          value: 50,
          name: "Berlin → Singapore"
        },
        {
          from: [13.4, 52.52],
          to: [77.21, 28.61],
          value: 53,
          name: "Berlin → Delhi"
        },
        {
          from: [13.4, 52.52],
          to: [-46.63, -23.55],
          value: 17,
          name: "Berlin → São Paulo"
        },
        {
          from: [13.4, 52.52],
          to: [151.21, -33.87],
          value: 24,
          name: "Berlin → Sydney"
        },
        {
          from: [13.4, 52.52],
          to: [28.05, -26.2],
          value: 38,
          name: "Berlin → Johannesburg"
        },
        {
          from: [13.4, 52.52],
          to: [-99.13, 19.43],
          value: 58,
          name: "Berlin → Mexico City"
        },
        {
          from: [13.4, 52.52],
          to: [121.47, 31.23],
          value: 13,
          name: "Berlin → Shanghai"
        },
        {
          from: [13.4, 52.52],
          to: [-79.38, 43.65],
          value: 7,
          name: "Berlin → Toronto"
        },
        {
          from: [13.4, 52.52],
          to: [55.27, 25.2],
          value: 9,
          name: "Berlin → Dubai"
        },
        {
          from: [13.4, 52.52],
          to: [72.88, 19.08],
          value: 44,
          name: "Berlin → Mumbai"
        },
        {
          from: [13.4, 52.52],
          to: [126.98, 37.57],
          value: 54,
          name: "Berlin → Seoul"
        },
        {
          from: [13.4, 52.52],
          to: [-3.7, 40.42],
          value: 45,
          name: "Berlin → Madrid"
        },
        {
          from: [13.4, 52.52],
          to: [3.38, 6.52],
          value: 60,
          name: "Berlin → Lagos"
        },
        {
          from: [13.4, 52.52],
          to: [-58.38, -34.6],
          value: 7,
          name: "Berlin → Buenos Aires"
        }
      ]
    }
  ],
  plotOptions: {
    map: {
      fit: "map"
    }
  },
  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 maps-arcs.json --out maps-arcs.svg --with-table` (save the options above as JSON first)
