HeatMap

x : Value 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: {
            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: [{
            name: "Values",
            borderWidth: 0,
            data: [
                [0, 0, 2.0],
                [0, 1, -1.7],
                [0, 2, 1.5],
                [0, 3, -1.9],
                [0, 4, -1.5],
                [1, 0, -1.5],
                [1, 1, 1.1],
                [1, 2, -1.1],
                [1, 3, 0.9],
                [1, 4, 2.3],
                [2, 0, -1.1],
                [2, 1, 0.8],
                [2, 2, 0.3],
                [2, 3, 1.2],
                [2, 4, -1.4],
            ]

        }]

    });
});