ochristensen
Posts: 5
Joined: Thu Dec 03, 2020 1:07 pm

multiple axis scrolling

https://jsfiddle.net/zenzizen/453okpbs/10/
my requirement is to enforce is a minimum height/width on each axis to ensure each "panel" doesn't become too small, but this means we might begin escaping the plot area, so we need to show scrollbars. scrollablePlotArea is only for one dimension it appears; ie I can't make it both horizontally and vertically scroll at the same time, which might happen. the scrollbar api is only applied to axes. so I thought to introduce a "fake" axis that would be the one that scrolls but I'm not sure that will accomplish what I want even if it did show up (it's not rendering in the attached sample) because it will scroll the data it's associated with and not affect the plot area for other axes. do I have to completely customize the scroll behavior to get this to work and how might I go about that?
mateusz.b
Posts: 2006
Joined: Tue Jul 13, 2021 11:34 am

Re: multiple axis scrolling

Hi ochristensen,

Thanks for contacting us with your question.

At this moment scrollablePlotArea works only either horizontally or vertically, not both, so unfortunately it wont help in your case. Axis.scrollbar won't help too, because that option works independently from other axes:
https://jsfiddle.net/BlackLabel/thsbn4qv/

What you can do is add overflow: scroll css rule:
https://jsfiddle.net/BlackLabel/2sc8jkoL/

The only drawback in that case is that axes are not sticky, and thus not visible while scrolling.

I think that scrollablePlotArea should work in both dimensions, so feel free to create a feature request here:
https://github.com/highcharts/highchart ... new/choose

Let me know if you have any further questions.
Regards!
Mateusz Bernacik
Highcharts Developer

Return to “Highcharts Stock”