Highcharts Demo
author(s):
Øystein Moseng
by sridhar reddy
HTML
<script src="https://code.highcharts.com/maps/highmaps.js"></script>
<script src="https://code.highcharts.com/modules/tilemap.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>
<div id="container"></div>
CSS
#container {
min-width: 250px;
max-width: 600px;
margin: 0 auto;
}
JavaScript
Highcharts.chart('container', {
chart: {
type: 'tilemap',
height: '100%'
},
title: {
text: 'Tilemap demo'
},
subtitle: {
text: 'Tilemap grid coordinates'
},
xAxis: {
visible: false
},
yAxis: {
visible: false
},
legend: {
enabled: false
},
tooltip: {
headerFormat: '',
pointFormat: 'x: {point.x}<br>y: {point.y}'
},
plotOptions: {
series: {
dataLabels: {
enabled: false,
},
borderWidth: 1,
borderColor: '#777'
}
},
series: [{
keys: ['x', 'y'],
color: '#fdfdfd',
data: [
[0, 0],
[1, 0],
[2, 0],
[3, 0],
[4, 0],
[0, 1],
[1, 1],
[2, 1],
[3, 1],
[4, 1],
[0, 2],
[1, 2],
[2, 2],
[3, 2],
[4, 2],
[0, 3],
[1, 3],
[2, 3],
[3, 3],
[4, 3]
]
}]
});