Highcharts Demo
author(s):
Torstein Hønsi
HTML
<script src="https://code.highcharts.com/maps/highmaps.js"></script>
<script src="https://code.highcharts.com/maps/modules/data.js"></script>
<script src="https://code.highcharts.com/maps/modules/exporting.js"></script>
<div id="container"></div>
CSS
#container {
height: 500px;
min-width: 310px;
max-width: 800px;
margin: 0 auto;
}
.loading {
margin-top: 10em;
text-align: center;
color: gray;
}
JavaScript
(async () => {
const topology = await fetch(
'https://code.highcharts.com/mapdata/custom/nordic-countries-core.topo.json'
).then(response => response.json());
const data = [1, 3, 5, 2, 4, 1, 3];
// Initialize the chart
Highcharts.mapChart('container', {
title: {
text: 'Data joined by <em>null</em>'
},
mapNavigation: {
enabled: true,
buttonOptions: {
verticalAlign: 'bottom'
}
},
colorAxis: {},
series: [{
data: data,
mapData: topology,
joinBy: null,
name: 'Random data'
}]
});
})();