Page 1 of 1

x-Axis css property.

Posted: Mon Jan 23, 2023 8:23 am
by Kishan silawat
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?

Re: x-Axis css property.

Posted: Mon Jan 23, 2023 4:39 pm
by dawid.d
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

Re: x-Axis css property.

Posted: Tue Jan 24, 2023 6:16 am
by Kishan silawat
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?

Re: x-Axis css property.

Posted: Wed Jan 25, 2023 10:28 pm
by dawid.d
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!