Dhananjayan
Posts: 5
Joined: Tue Mar 23, 2021 9:43 am

ScrollablePlotArea's fixed header move's outside the view when scrolled to the bottom.

Using ScrollablePlotArea we could achieve a fixed x-axis label.

The problem we are facing is
- For dynamic data we need to calculate minHeight for scrollablePlotArea otherwise, it doesn't display a fixed x-axis label or hide the entire chart.
- When scroll down fixed x-axis labels become relative and moves outside the view. In the below code snippet, you could see.

https://jsfiddle.net/Dhananjayan/s97zjk5m/7/


If we could able to fix the chart with constant height and fixed header, it would be awesome.
User avatar
sebastian.h
Posts: 1734
Joined: Fri Aug 07, 2020 7:08 am

Re: ScrollablePlotArea's fixed header move's outside the view when scrolled to the bottom.

Hi,
We appreciate you reaching out to us again.

It seems that adjusting the height prevents the chart from disappearing. Let's look at this Github topic that describes this.
https://github.com/highcharts/highcharts/issues/11556

Demo:
https://jsfiddle.net/BlackLabel/7f0bmhpL/

API References:
https://api.highcharts.com/gantt/chart.height

Let me know if this solution is fit for your case.
Best regards.
Sebastian Hajdus
Highcharts Developer
Dhananjayan
Posts: 5
Joined: Tue Mar 23, 2021 9:43 am

Re: ScrollablePlotArea's fixed header move's outside the view when scrolled to the bottom.

Hi,

In my case, assigning height 500px and calculating the minHeight for scrollablePlotArea by multiplying the number of yAxis rows with 50px works.

Thanks for your help.
User avatar
sebastian.h
Posts: 1734
Joined: Fri Aug 07, 2020 7:08 am

Re: ScrollablePlotArea's fixed header move's outside the view when scrolled to the bottom.

That's great to hear! :)

In case of any further questions, feel free to contact us again.
Sebastian Hajdus
Highcharts Developer

Return to “Highcharts Gantt”