NoxArt
NoxArt

Reputation: 361

Highcharts empty when zoomed X

In a simple column graph with datetime values {UTC, y-value}, any attempt of zooming results in an empty graph, even parts where there have to be data.

Labels under the graph are correct so the UTC values should be ok.

What am I doing wrong?
Thank you

JSFiddle: http://jsfiddle.net/hhoo29sy/1/

...
chart: {
    type: 'column',
    zoomType: 'x'
},
xAxis: {
    type: 'datetime',
    minRange: 14 * 86400000, // 2 weeks
    dateTimeLabelFormats: {
        month: '%e. %b',
        year: '%b'
    },
    minTickInterval: 12 * 3600 * 1000
},
...

Upvotes: 0

Views: 489

Answers (1)

aVC
aVC

Reputation: 2344

Your data could be the problem. TAking a look at the console, it gives the following error. Highcharts Error #15

Highcharts expects data to be sorted

This happens when you are trying to create a line series or a stock chart where the data is not sorted in ascending X order. For performance reasons, Highcharts does not sort the data, instead it is required that the implementer pre-sorts the data.

Upvotes: 3

Related Questions