I created two simple time data charts with the same data. In the second one I switched the third and fourth data points and my chart becomes ugly.
You can see the results here: http://jsfiddle.net/EdmundoDelGusto/1j8eh2ya/
first chart:
series: [{
data: [
[Date.UTC(2010, 0, 1), 29.9], //1.
[Date.UTC(2010, 0, 2), 71.5], //2.
[Date.UTC(2010, 0, 3), 106.4], //3.
[Date.UTC(2010, 0, 6), 129.2], //4.
[Date.UTC(2010, 0, 7), 144.0], //5.
[Date.UTC(2010, 0, 8), 176.0] //6.
]
}]
second chart:
series: [{
data: [
[Date.UTC(2010, 0, 1), 29.9], //1.
[Date.UTC(2010, 0, 2), 71.5], //2.
[Date.UTC(2010, 0, 6), 129.2], //4. <<-switched
[Date.UTC(2010, 0, 3), 106.4], //3.
[Date.UTC(2010, 0, 7), 144.0], //5.
[Date.UTC(2010, 0, 8), 176.0] //6.
]
}]
I want the second chart to look like the first chart without the need to order my data-series.
Is it possible, that Highcharts automatically connects the points in the order of the dates even if my data is in wrong order? Or do I have to sort my data first? Because in my term I got a big unsorted JSON array and maybe there is an easy solution to this.
Edit: seems like you can't do it, so I leave this post here, on how to sort an Json Array by Date: Sort JSON array by date key