Pixel
The choropleth drawn as a dot (pixel) map.
Open the chart without page chrome ↗Drawing width at least 900 px. Scroll within the chart on smaller screens.
const options = {
"chart": {
"height": 480,
"toolbar": {
"show": false
},
"type": "map"
},
"series": [
{
"name": "Adoption %",
"data": [
{
"id": "DEU",
"region": "Europe",
"value": 44.7
},
{
"id": "FRA",
"region": "Europe",
"value": 61.8
},
{
"id": "GBR",
"region": "Europe",
"value": 66.2
},
{
"id": "ITA",
"region": "Europe",
"value": 53.4
},
{
"id": "ESP",
"region": "Europe",
"value": 61
},
{
"id": "NLD",
"region": "Europe",
"value": 75.9
},
{
"id": "BEL",
"region": "Europe",
"value": 86.6
},
{
"id": "CHE",
"region": "Europe",
"value": 56.8
},
{
"id": "AUT",
"region": "Europe",
"value": 74.3
},
{
"id": "POL",
"region": "Europe",
"value": 55.1
},
{
"id": "SWE",
"region": "Europe",
"value": 40.5
},
{
"id": "NOR",
"region": "Europe",
"value": 50.3
},
{
"id": "DNK",
"region": "Europe",
"value": 43
},
{
"id": "FIN",
"region": "Europe",
"value": 56
},
{
"id": "IRL",
"region": "Europe",
"value": 57.7
},
{
"id": "PRT",
"region": "Europe",
"value": 69.6
},
{
"id": "CZE",
"region": "Europe",
"value": 64.3
},
{
"id": "HUN",
"region": "Europe",
"value": 48.1
},
{
"id": "ROU",
"region": "Europe",
"value": 43.9
},
{
"id": "GRC",
"region": "Europe",
"value": 62.2
},
{
"id": "SVK",
"region": "Europe",
"value": 59.1
},
{
"id": "BGR",
"region": "Europe",
"value": 74
},
{
"id": "HRV",
"region": "Europe",
"value": 35.1
},
{
"id": "SRB",
"region": "Europe",
"value": 85.3
},
{
"id": "SVN",
"region": "Europe",
"value": 74.2
},
{
"id": "LTU",
"region": "Europe",
"value": 80.2
},
{
"id": "LVA",
"region": "Europe",
"value": 33.2
},
{
"id": "EST",
"region": "Europe",
"value": 69.6
},
{
"id": "UKR",
"region": "Europe",
"value": 55.9
},
{
"id": "BLR",
"region": "Europe",
"value": 48.5
},
{
"id": "ISL",
"region": "Europe",
"value": 44.8
},
{
"id": "USA",
"region": "North America",
"value": 74.1
},
{
"id": "CAN",
"region": "North America",
"value": 49.4
},
{
"id": "MEX",
"region": "North America",
"value": 53.9
},
{
"id": "GTM",
"region": "North America",
"value": 73.3
},
{
"id": "CRI",
"region": "North America",
"value": 71.2
},
{
"id": "PAN",
"region": "North America",
"value": 96.9
},
{
"id": "CUB",
"region": "North America",
"value": 78.2
},
{
"id": "DOM",
"region": "North America",
"value": 70.7
},
{
"id": "BRA",
"region": "South America",
"value": 20.9
},
{
"id": "ARG",
"region": "South America",
"value": 23.6
},
{
"id": "CHL",
"region": "South America",
"value": 16.6
},
{
"id": "COL",
"region": "South America",
"value": 30
},
{
"id": "PER",
"region": "South America",
"value": 33.5
},
{
"id": "URY",
"region": "South America",
"value": 21
},
{
"id": "ECU",
"region": "South America",
"value": 18.4
},
{
"id": "VEN",
"region": "South America",
"value": 16.9
},
{
"id": "BOL",
"region": "South America",
"value": 27.9
},
{
"id": "PRY",
"region": "South America",
"value": 34.5
},
{
"id": "JPN",
"region": "Asia",
"value": 45.9
},
{
"id": "KOR",
"region": "Asia",
"value": 35.1
},
{
"id": "CHN",
"region": "Asia",
"value": 46.3
},
{
"id": "IND",
"region": "Asia",
"value": 27
},
{
"id": "IDN",
"region": "Asia",
"value": 43.9
},
{
"id": "SGP",
"region": "Asia",
"value": 21
},
{
"id": "MYS",
"region": "Asia",
"value": 25.3
},
{
"id": "THA",
"region": "Asia",
"value": 28.2
},
{
"id": "VNM",
"region": "Asia",
"value": 37.7
},
{
"id": "PHL",
"region": "Asia",
"value": 44.9
},
{
"id": "ISR",
"region": "Asia",
"value": 36.6
},
{
"id": "ARE",
"region": "Asia",
"value": 46.1
},
{
"id": "SAU",
"region": "Asia",
"value": 44.1
},
{
"id": "TUR",
"region": "Asia",
"value": 35.2
},
{
"id": "KAZ",
"region": "Asia",
"value": 46.8
},
{
"id": "PAK",
"region": "Asia",
"value": 23.2
},
{
"id": "BGD",
"region": "Asia",
"value": 32.2
},
{
"id": "LKA",
"region": "Asia",
"value": 23.7
},
{
"id": "AUS",
"region": "Oceania",
"value": 67.3
},
{
"id": "NZL",
"region": "Oceania",
"value": 48.9
},
{
"id": "ZAF",
"region": "Africa",
"value": 12.5
},
{
"id": "NGA",
"region": "Africa",
"value": 8.8
},
{
"id": "EGY",
"region": "Africa",
"value": 11.4
},
{
"id": "KEN",
"region": "Africa",
"value": 13.5
},
{
"id": "MAR",
"region": "Africa",
"value": 9.8
},
{
"id": "GHA",
"region": "Africa",
"value": 14.1
},
{
"id": "ETH",
"region": "Africa",
"value": 13.5
},
{
"id": "TZA",
"region": "Africa",
"value": 12.5
},
{
"id": "DZA",
"region": "Africa",
"value": 8.5
},
{
"id": "TUN",
"region": "Africa",
"value": 15.2
},
{
"id": "SEN",
"region": "Africa",
"value": 16.7
},
{
"id": "CIV",
"region": "Africa",
"value": 11.8
},
{
"id": "AGO",
"region": "Africa",
"value": 14.9
}
]
}
],
"plotOptions": {
"map": {
"map": "world-small-states",
"style": "dots",
"dots": {
"spacing": 7,
"size": 0.75
}
}
},
"theme": {
"mode": "light",
"preset": "coastal"
}
}
const chart = new WestCoastCharts(document.querySelector('#chart'), options)
chart.render()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-small-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
const options = {
"chart": {
"height": 480,
"toolbar": {
"show": false
},
"type": "map"
},
"series": [
{
"name": "Adoption %",
"data": [
{
"id": "DEU",
"region": "Europe",
"value": 44.7
},
{
"id": "FRA",
"region": "Europe",
"value": 61.8
},
{
"id": "GBR",
"region": "Europe",
"value": 66.2
},
{
"id": "ITA",
"region": "Europe",
"value": 53.4
},
{
"id": "ESP",
"region": "Europe",
"value": 61
},
{
"id": "NLD",
"region": "Europe",
"value": 75.9
},
{
"id": "BEL",
"region": "Europe",
"value": 86.6
},
{
"id": "CHE",
"region": "Europe",
"value": 56.8
},
{
"id": "AUT",
"region": "Europe",
"value": 74.3
},
{
"id": "POL",
"region": "Europe",
"value": 55.1
},
{
"id": "SWE",
"region": "Europe",
"value": 40.5
},
{
"id": "NOR",
"region": "Europe",
"value": 50.3
},
{
"id": "DNK",
"region": "Europe",
"value": 43
},
{
"id": "FIN",
"region": "Europe",
"value": 56
},
{
"id": "IRL",
"region": "Europe",
"value": 57.7
},
{
"id": "PRT",
"region": "Europe",
"value": 69.6
},
{
"id": "CZE",
"region": "Europe",
"value": 64.3
},
{
"id": "HUN",
"region": "Europe",
"value": 48.1
},
{
"id": "ROU",
"region": "Europe",
"value": 43.9
},
{
"id": "GRC",
"region": "Europe",
"value": 62.2
},
{
"id": "SVK",
"region": "Europe",
"value": 59.1
},
{
"id": "BGR",
"region": "Europe",
"value": 74
},
{
"id": "HRV",
"region": "Europe",
"value": 35.1
},
{
"id": "SRB",
"region": "Europe",
"value": 85.3
},
{
"id": "SVN",
"region": "Europe",
"value": 74.2
},
{
"id": "LTU",
"region": "Europe",
"value": 80.2
},
{
"id": "LVA",
"region": "Europe",
"value": 33.2
},
{
"id": "EST",
"region": "Europe",
"value": 69.6
},
{
"id": "UKR",
"region": "Europe",
"value": 55.9
},
{
"id": "BLR",
"region": "Europe",
"value": 48.5
},
{
"id": "ISL",
"region": "Europe",
"value": 44.8
},
{
"id": "USA",
"region": "North America",
"value": 74.1
},
{
"id": "CAN",
"region": "North America",
"value": 49.4
},
{
"id": "MEX",
"region": "North America",
"value": 53.9
},
{
"id": "GTM",
"region": "North America",
"value": 73.3
},
{
"id": "CRI",
"region": "North America",
"value": 71.2
},
{
"id": "PAN",
"region": "North America",
"value": 96.9
},
{
"id": "CUB",
"region": "North America",
"value": 78.2
},
{
"id": "DOM",
"region": "North America",
"value": 70.7
},
{
"id": "BRA",
"region": "South America",
"value": 20.9
},
{
"id": "ARG",
"region": "South America",
"value": 23.6
},
{
"id": "CHL",
"region": "South America",
"value": 16.6
},
{
"id": "COL",
"region": "South America",
"value": 30
},
{
"id": "PER",
"region": "South America",
"value": 33.5
},
{
"id": "URY",
"region": "South America",
"value": 21
},
{
"id": "ECU",
"region": "South America",
"value": 18.4
},
{
"id": "VEN",
"region": "South America",
"value": 16.9
},
{
"id": "BOL",
"region": "South America",
"value": 27.9
},
{
"id": "PRY",
"region": "South America",
"value": 34.5
},
{
"id": "JPN",
"region": "Asia",
"value": 45.9
},
{
"id": "KOR",
"region": "Asia",
"value": 35.1
},
{
"id": "CHN",
"region": "Asia",
"value": 46.3
},
{
"id": "IND",
"region": "Asia",
"value": 27
},
{
"id": "IDN",
"region": "Asia",
"value": 43.9
},
{
"id": "SGP",
"region": "Asia",
"value": 21
},
{
"id": "MYS",
"region": "Asia",
"value": 25.3
},
{
"id": "THA",
"region": "Asia",
"value": 28.2
},
{
"id": "VNM",
"region": "Asia",
"value": 37.7
},
{
"id": "PHL",
"region": "Asia",
"value": 44.9
},
{
"id": "ISR",
"region": "Asia",
"value": 36.6
},
{
"id": "ARE",
"region": "Asia",
"value": 46.1
},
{
"id": "SAU",
"region": "Asia",
"value": 44.1
},
{
"id": "TUR",
"region": "Asia",
"value": 35.2
},
{
"id": "KAZ",
"region": "Asia",
"value": 46.8
},
{
"id": "PAK",
"region": "Asia",
"value": 23.2
},
{
"id": "BGD",
"region": "Asia",
"value": 32.2
},
{
"id": "LKA",
"region": "Asia",
"value": 23.7
},
{
"id": "AUS",
"region": "Oceania",
"value": 67.3
},
{
"id": "NZL",
"region": "Oceania",
"value": 48.9
},
{
"id": "ZAF",
"region": "Africa",
"value": 12.5
},
{
"id": "NGA",
"region": "Africa",
"value": 8.8
},
{
"id": "EGY",
"region": "Africa",
"value": 11.4
},
{
"id": "KEN",
"region": "Africa",
"value": 13.5
},
{
"id": "MAR",
"region": "Africa",
"value": 9.8
},
{
"id": "GHA",
"region": "Africa",
"value": 14.1
},
{
"id": "ETH",
"region": "Africa",
"value": 13.5
},
{
"id": "TZA",
"region": "Africa",
"value": 12.5
},
{
"id": "DZA",
"region": "Africa",
"value": 8.5
},
{
"id": "TUN",
"region": "Africa",
"value": 15.2
},
{
"id": "SEN",
"region": "Africa",
"value": 16.7
},
{
"id": "CIV",
"region": "Africa",
"value": 11.8
},
{
"id": "AGO",
"region": "Africa",
"value": 14.9
}
]
}
],
"plotOptions": {
"map": {
"map": "world-small-states",
"style": "dots",
"dots": {
"spacing": 7,
"size": 0.75
}
}
},
"theme": {
"mode": "light",
"preset": "coastal"
}
}
const chart = new WestCoastCharts(document.querySelector('#chart'), options)
await chart.render() Waiting for the chart.
Open Data & agent view to read this chart through chart.describe().
Read from the running library through its optional agent/describe module. Text, table and JSON share the same snapshot. Demo data only.
$ wcc chart export maps-pixel.json --out maps-pixel.svg --with-table Public agent tools 0.2.3, tested with Library 1.1.5; available from the versioned GitHub release and npm. Save a JSON spec first and check the loaded runtime and supported modules before rendering. Command reference
Loading /gallery/maps/pixel/index.md … This example uses Premium modules. Compare licences · Embedding in a distributed product?