kruthika s
Posts: 10
Joined: Tue Jan 18, 2022 12:57 pm

Scrollbar issue in bar graph

HI,

I have made a bar chart with Highcharts in a angular app
I have used Highstock for managing scrollbar because there are many categories
.

https://stackblitz.com/edit/highcharts- ... mponent.ts(output exactly same)

The problem is when I scroll down after reaching end if we still scroll, the max number of visible categories is no more respected (5 in my example) until you reach the end (all categories displayed)

Note: i have not used mouse wheel


but it should stop scrolling
How can I do that ?
mateusz.b
Posts: 2006
Joined: Tue Jul 13, 2021 11:34 am

Re: Scrollbar issue in bar graph

Hi kruthika s,

Welcome to our forum and thanks for contacting us with your issue!

This behaviour is caused by that custom 'wheel' plugin. You should use scrollablePlotArea instead, where scrolling with mouse wheel works by default.
Demo: https://stackblitz.com/edit/highcharts- ... mponent.ts

Let me know if you have any further questions!
Regards!
Mateusz Bernacik
Highcharts Developer
kruthika s
Posts: 10
Joined: Tue Jan 18, 2022 12:57 pm

Re: Scrollbar issue in bar graph

Hi mateusz.b,

First thank you for your response.

I have not used used custom wheel plugin in my original code I have added just an example and moreover I am dynamically changing height of chart if it as lesser data than max value

Is there any other possible way other than scrollablePlotArea options
mateusz.b
Posts: 2006
Joined: Tue Jul 13, 2021 11:34 am

Re: Scrollbar issue in bar graph

kruthika s,

As you can read in our docs here: https://www.highcharts.com/docs/chart-c ... /scrollbar,
scrollablePlotArea and xAxis.scrollbar from stock are the only two available options and only for the first one mouse wheel works by default. If you would like to see something else implemented, then please create a feature request on our github

Alternatively, you could try approach suggested in this topic: viewtopic.php?t=38506 which seems to work fine.
Demo: http://jsfiddle.net/BlackLabel/2ay9gb1c/

Feel free to ask any further questions!
Regards!
Mateusz Bernacik
Highcharts Developer
kruthika s
Posts: 10
Joined: Tue Jan 18, 2022 12:57 pm

Re: Scrollbar issue in bar graph

Thank you for the response .

I tried using Scrollplotarea as you suggested
mateusz.b
Posts: 2006
Joined: Tue Jul 13, 2021 11:34 am

Re: Scrollbar issue in bar graph

You're welcome. In case of any further questions feel free to ask.

Regards!
Mateusz Bernacik
Highcharts Developer

Return to “Highcharts Stock”