I have dates stored in an array that needs to be display on the x-axis of the chart. How can I format the date so that it renders properly on x-axis?
{
"xData": ["2020-10-01T19:30:00.000Z",
"2020-10-02T19:30:00.000Z",
"2020-10-03T19:30:00.000Z",
"2020-10-04T19:30:00.000Z",
"2020-10-05T19:30:00.000Z",
...
...
]
}
Highcharts.chart('container, {
chart: {
marginLeft: 40
},
title: {
text: ''
},
xAxis: {
categories: Date.UTC(xData),
},
yAxis: {
title: {
text: null
}
},
series: [{
data: dataset.data,
}]
});