Despite my best efforts to obtain sorted data from various API calls, I find myself with unsorted data that needs to be plotted in a timeseries graph.
{
xAxis: {
type: 'datetime'
},
series: [{
data: [
[Date.UTC(2020, 0, 1), 29.9],
[Date.UTC(2020, 0, 2), 71.5],
[Date.UTC(2020, 0, 6), 106.4],
[Date.UTC(2020, 0, 3), 129.2],
[Date.UTC(2020, 0, 5), 144.0],
[Date.UTC(2020, 0, 8), 176.0]
]
}]
}
Using the above options for highcharts causes the line to travel backwards, as shown https://i.sstatic.net/Btk88.png.
Is there a way to make highcharts automatically sort the data and plot the chart correctly? I have attempted to use the dataSorting
option without success.
Given that Highcharts offers a dataSorting
flag for sorting, it is not unreasonable for me to expect this functionality.