leecher2k
Posts: 17
Joined: Wed Aug 23, 2017 5:09 pm

keep scrollbar visible if axis invisible

Hello there.

My use case requires the xAxis of my chart to be invisible but this results in the corresponding scrollbar to be invisible as well.

My use case is the following: I have 2 charts next to each other. The first is a regular bar plot with a scrollbar and the second is a stacked bar plot with a scrollbar. Both have the same xAxis and should be in sync (in the future there should only be one scrollbar which scrolls both charts in sync )

In this use case I obviously do not want a redundant xAxis and therefore set the visibility to false. This however hides the scrollbar as well.

I guess I could hack the position of the first scrollbar to be on the right side of the second chart? How would I offset the scrollbar? Or I could use HTML for the second xAxis and hide every entry with a style manually and make the xAxis itself and therefore the scrollbar visible again?

edit: seems like html is not allowing the visibility/hidden tag to be used: https://www.highcharts.com/docs/chart-c ... tting#html (probably would not be appliable to the xaxis units anyway

Any recommended way to solve this? Can I force the scrollbar to be visible instead?

Example jsfiddle: https://jsfiddle.net/nmk08paq/

Edit2: I was able to build on top of someone who used multiple charts next to each other in one chart: http://jsfiddle.net/nq1p6s4v/. So I guess the question is obsolete

Thanks in advance :)
rafalS
Posts: 2665
Joined: Thu Jun 14, 2018 11:40 am

Re: keep scrollbar visible if axis invisible

Hi, leecher2k!

Forgive me but I am a little confused :D have you solved your problem already? If not, could you one more time simply explain, what do you want to achieve?

Best regards!
Rafal Sebestjanski,
Highcharts Team Lead

Return to “Highcharts Usage”