JSFiddle - React, Tailwind, and code Playground
Highmaps demo
HTML
<script src="https://code.highcharts.com/maps/highmaps.js"></script>
<script src="https://code.highcharts.com/maps/modules/exporting.js"></script>
<script src="https://code.highcharts.com/mapdata/custom/world.js"></script>
<div id="container"></div>
CSS
#container {
height: 700px;
min-width: 310px;
max-width: 1000px;
margin: 0 auto;
}
.loading {
margin-top: 10em;
text-align: center;
color: gray;
}
JavaScript
// Prepare demo data
// Data is joined to map using value of 'hc-key' property by default.
// See API docs for 'joinBy' for more info on linking data and map.
var data = [
{
code: 'TW',
name: 'United Kingdom',
value: '4',
label: 'HOT',
label1: 'UP'
},
{
code: 'PT',
name: 'Portugalz',
value: '3',
label: 'WARM',
label1: 'DOWN'
},
{
code: 'US',
name: 'United States',
value: '2',
label: 'LUKEWARM',
label1: 'UP'
},
{
code: 'DE',
name: 'Germany',
value: '1',
label: 'COLD',
label1: 'DOWN'
}
]
// Create the chart
Highcharts.mapChart('container', {
chart: {
map: 'custom/world'
},
title: {
text: ''
},
subtitle: {
text: ''
},
credits: {
enabled: false
},
exporting: {
enabled: false
},
mapNavigation: {
enabled: true,
buttonOptions: {
verticalAlign: 'bottom'
}
},
colorAxis: {
min: 1,
max: 5,
stops: [
[0, '#54616c'],
[0.25, '#144178'],
[0.5, '#009fe3'],
[0.75, '#ff9966'],
[1, '#e65e09']
]
},
tooltip: {
headerFormat: '<span style="font-size:10px">{point.key}</span><br/>',
pointFormat: 'Current tendering condition: <b>{point.label}</b><br>Future market outlook: <b>{point.label1}</b>',
footerFormat: ''
},
series: [{
data: data,
joinBy: ['iso-a2', 'code'],
name: 'Current tendering conditions',
states: {
hover: {
color: ''
}
},
dataLabels: {
enabled: false,
format: '{point.name}'
}
}]
});