Highcharts dates one day

I skip milliseconds for the x axis and then define the x axis as:

    xAxis: {
        type: 'datetime'
    },

However, Highcharts doesn't seem to get the exact date on the x axis, but instead turns off for one day. To illustrate this, hover over any of the bars (fiddle at the bottom of this post) and you will see that Highcharts interprets that day, but then click any of them and I have an on-click event to warn you that what actual date should be. Notice how it is turned off for one day.

Is this a known bug in Highcharts? Any workarounds?

Here is my fiddle: http://jsfiddle.net/hohenheim/j8cTE/33/

+4
source share
1 answer

, , , / UTC. Highcharts - UTC (0). (http://api.highcharts.com/highcharts#global), :

function appendAds(date1) {
   alert(new Date(date1).toUTCString());
   $('#tableTitle').html("<u>Info for " + timeConverter(date1) + ":</u>");
   ...
}

() http://jsfiddle.net/j8cTE/34/

, "toUTCString()" . , , , UTC, "toUTCString()" .

UPDATE: , "toUTCString()" , -, . , , appendAds, . UTC , . . , . MDN (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date).

/ , , ( , ..) - , UTC . , (, ). , , , , , ( ).

+1

Source: https://habr.com/ru/post/1541316/


All Articles