lcm
Posts: 2
Joined: Thu Jan 18, 2018 9:55 am

Double datetime xAxis with one Serie

Hi Highcharts,
I would like to get a chart with two datetime xAxis. One at the bottom with a format label like this '%e. %b' and one with a format label like this '%a'.
I tried to add an array of xAxis and only one of them has the property "opposite: true", but it is ignored. I have found many examples, but all have more than one series in which the "xAxis: 1" or "xAxis: 0" property exists.
You can help me?

Luca
rafalS
Posts: 2665
Joined: Thu Jun 14, 2018 11:40 am

Re: Double datetime xAxis with one Serie

Hi, lcm!

What if we create a second fake series, hide it and connect to a second x-axis?

https://jsfiddle.net/BlackLabel/hd5b3tcy/

Best regards!
Rafal Sebestjanski,
Highcharts Team Lead
lcm
Posts: 2
Joined: Thu Jan 18, 2018 9:55 am

Re: Double datetime xAxis with one Serie

Thanks Rafal, it's a good idea! if it is not possible to do anything else.

Luca
rafalS
Posts: 2665
Joined: Thu Jun 14, 2018 11:40 am

Re: Double datetime xAxis with one Serie

As you said, we can not connect one series with two different y-axes so we need to figure out how to workaround this and the idea I came up with is simple and working as expected ;) Let me know if you have any suggestion or requirements to do it differently.

Kind regards
Rafal Sebestjanski,
Highcharts Team Lead

Return to “Highcharts Usage”