Kishan silawat
Posts: 8
Joined: Thu Nov 24, 2022 10:10 am

x-Axis css property.

Mon Jan 23, 2023 8:23 am

Hello,

I have added a class name in the x-axis and trying to change CSS when I'm changing (position: fixed) it is not making it fixed.

I'm also adding a scrollbar for this I need to fix the x-axis while scrolling.
Is there any other way to make the x-axis fixed in the Gantt chart?

dawid.d
Posts: 298
Joined: Thu Oct 06, 2022 11:31 am

Re: x-Axis css property.

Mon Jan 23, 2023 4:39 pm

Hello,

Thanks for contacting us with your question!

If you are talking about scrolling for the x-axis, have you considered using the Highcharts built-in scrollbar?
See: https://api.highcharts.com/gantt/scrollbar

Demo: https://jsfiddle.net/BlackLabel/wxzomuys/

For y-axis scrolling, use scrollablePlotArea.
See: https://api.highcharts.com/gantt/chart. ... .minHeight

Let me know if that was what you were looking for!
Best regards

Kishan silawat
Posts: 8
Joined: Thu Nov 24, 2022 10:10 am

Re: x-Axis css property.

Tue Jan 24, 2023 6:16 am

Thanks for the reply and solution.

I need to use like this https://jsfiddle.net/gh/get/library/pur ... a-vertical

But the problem is here it is not showing all the data because of the minHeight. Can we set minHeight dynamically of the basis of data length?

dawid.d
Posts: 298
Joined: Thu Oct 06, 2022 11:31 am

Re: x-Axis css property.

Wed Jan 25, 2023 10:28 pm

Hi,

I thought about it more and it seems that in your case an even better way would be to set the scrollbar for the y-axis.

Demo: https://jsfiddle.net/BlackLabel/r6Lhf05n/

Unfortunately, you can run into a problem here as well when using collapsible rows at the same time. I found a bug report on our official GitHub about this topic. See: https://github.com/highcharts/highcharts/issues/13898 You can read more about it there, ask for an update and possible workarounds.

Feel free to ask any further questions!
Best regards!

Return to “Highcharts Gantt”