Search code examples
highchartshighmaps

Heatmap show previous day in the tooltip


I am trying to create a heatmap very similar to that in this official demo.

However, I am having trouble with the tooltip, which has formatting:

pointFormat: '{point.x:%e %b, %Y} {point.y}:00: <b>{point.value:,.2f} kWh</b>'

The problem is that the xAxis shows "30. Jun", but the tooltip shows "29. Jun" (date - 1day)

I am providing a JSFiddle that replicates the issue: http://jsfiddle.net/p5dxt2q2/


Solution

  • You need to disable UTC.

    Highcharts.setOptions({
        global:{
            useUTC: false
        } 
    });
    

    Docs: http://api.highcharts.com/highcharts#global.useUTC