HeatMap
x : String y : Value
by amrutaJgtp
HTML
<script src="https://code.highcharts.com/stock/highstock.js"></script>
<script src="https://code.highcharts.com/maps/modules/map.js"></script>
<div id="container" style="height: 400px; max-width: 400px; margin: 0 auto"></div>
JavaScript
$(function () {
$('#container').highcharts({
chart: {
type: 'heatmap'
},
title: {
text: 'Heat map',
align: 'left'
},
xAxis: {
categories : ['Sunday','Monday','Tuesday'],
type: 'linear' //attribute not given in API
//has no effect when using CSV format
},
yAxis: {
title: {
text: null
},
},
colorAxis: {
stops: [
[0, '#3060cf'],
[0.5, '#fffbbc'],
[0.9, '#c4463a']
],
min: -5
},
series: [{
borderWidth: 0,
data: [
[0, 0, 2.0],
[0, 1, -3.7],
[0, 2, 1.5],
[0, 3, -5.0],
[0, 4, 0.2],
[1, 0, -1.5],
[1, 1, 1.1],
[1, 2, -1.1],
[1, 3, -3.1],
[1, 4, 0.7],
[2, 0, -1.1],
[2, 1, 0.8],
[2, 2, 0.3],
[2, 3, -3.8],
[2, 4, 1.2],
]
}]
});
});