Is there a way to have \'datetime\' for the xAxis type on the main series, but then when a series is clicked on, have the drilldown use categories for that time?
I
I have found a solution for your problem! Sebastian Bochan gave me some ideas. You need to separate xAxis and set a different type to each one. So, here you have to add your categories as Highcharts's way.
xAxis: [{
id: 0,
type: 'datetime'
},
{
id: 1,
type: 'categories',
categories: data.categories
}
]
Then you have to add this code in your serie to link it with your new Axis.
drilldown: {
series: [{
name: "test",
id: "test",
xAxis: 1, // <--- your desired X axis ID
data: [
[your data]
]
}]
}
Probably you'll see a small difference on bottom chart, but all works for me.
I hope this help to you ;)
You need to add this to your xAxis
:
labels: {
formatter: function() {
return Highcharts.dateFormat('%a %d %b', this.value);
}
},
Check out the fiddle.