JSFiddle - React, Tailwind, and code Playground

by wergeld

HTML

<script src="http://code.highcharts.com/highcharts.js"></script>
<script src="http://code.highcharts.com/modules/heatmap.js"></script>
<script src="http://code.highcharts.com/modules/exporting.js"></script>
<div id="container" style="width:100%; height: 100%; margin: 0 auto"></div>

JavaScript

$('#container').highcharts({
        chart: {
            type: 'heatmap'
        },
        title: {
            text: null
        },
        tooltip: {
            formatter: function () {
                return '<b>' + this.series.yAxis.categories[this.point.y] + ' </b> had a value of <br><b>' + this.point.value + '</b> on <b>' + this.series.xAxis.categories[this.point.x] + '</b>';
            },
            //backgroundColor: null,
            borderWidth: 1,
            borderColor: '#000000',
            distance: 10,
            shadow: false,
            useHTML: true,
            style: {
                padding: 0,
                color: 'black'
            }
        },
        xAxis: {
            categories: ['2013-04-01', '2013-04-02', '2013-04-03'],
            labels: {
                rotation: 90
            }
        },
        yAxis: {
            title: {
                text: null
            },
            labels: {
                enabled: false
            },
            categories: ['Midnight', '1 am', '2 am', '3 am', '4 am', '5 am', '6 am', '7 am', '8 am', '9 am', '10 am', '11 am', 'Noon', '1 pm', '2 pm', '3 pm', '4 pm', '5 pm', '6 pm', '7 pm', '8 pm', '9 pm', '10 pm', '11 pm'],
            min: 0,
            max: 23,
            reversed: true
        },
        colorAxis: {
            stops: [
                [0, '#c4463a'],
                [0.1, '#c4463a'],
                [0.5, '#ffffff'],
                [1, '#3060cf']
            ],
            min: -50,
            max: 5,
            //minColor: '#FF0000',
            //maxColor: '#008000',
            startOnTick: false,
            endOnTick: false
        },
        series: [{
            borderWidth: 0,
            nullColor: '#EFEFEF',
            data: [ [0,0,-0.7], [1,0,-3.4], [2,0,-1.1] ]
        }]

    });