# Bubbles (Maps example)

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

City sizes as proportional circles, with a size key.

- Chart type: `map` (Map)
- Collection: Maps · Maps
- Raw configuration: https://westcoast-charts.com/gallery-src/maps/bubbles.js
- Standalone example: https://westcoast-charts.com/embed/samples/wcc/gallery/premium/maps/bubbles.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: "Visitors (m)",
      data: [
        {
          name: "New York",
          lon: -74,
          lat: 40.7,
          value: 5
        },
        {
          name: "London",
          lon: -0.13,
          lat: 51.5,
          value: 30
        },
        {
          name: "Paris",
          lon: 2.35,
          lat: 48.86,
          value: 27
        },
        {
          name: "Berlin",
          lon: 13.4,
          lat: 52.52,
          value: 33
        },
        {
          name: "Tokyo",
          lon: 139.69,
          lat: 35.69,
          value: 18
        },
        {
          name: "Los Angeles",
          lon: -118.24,
          lat: 34.05,
          value: 38
        },
        {
          name: "Singapore",
          lon: 103.82,
          lat: 1.35,
          value: 38
        },
        {
          name: "Delhi",
          lon: 77.21,
          lat: 28.61,
          value: 30
        },
        {
          name: "São Paulo",
          lon: -46.63,
          lat: -23.55,
          value: 20
        },
        {
          name: "Sydney",
          lon: 151.21,
          lat: -33.87,
          value: 16
        },
        {
          name: "Johannesburg",
          lon: 28.05,
          lat: -26.2,
          value: 36
        },
        {
          name: "Mexico City",
          lon: -99.13,
          lat: 19.43,
          value: 23
        },
        {
          name: "Shanghai",
          lon: 121.47,
          lat: 31.23,
          value: 24
        },
        {
          name: "Toronto",
          lon: -79.38,
          lat: 43.65,
          value: 8
        },
        {
          name: "Dubai",
          lon: 55.27,
          lat: 25.2,
          value: 4
        },
        {
          name: "Mumbai",
          lon: 72.88,
          lat: 19.08,
          value: 34
        },
        {
          name: "Seoul",
          lon: 126.98,
          lat: 37.57,
          value: 31
        },
        {
          name: "Madrid",
          lon: -3.7,
          lat: 40.42,
          value: 5
        },
        {
          name: "Lagos",
          lon: 3.38,
          lat: 6.52,
          value: 18
        },
        {
          name: "Buenos Aires",
          lon: -58.38,
          lat: -34.6,
          value: 12
        }
      ]
    }
  ],
  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-bubbles.json --out maps-bubbles.svg --with-table` (save the options above as JSON first)
