janir4
Posts: 7
Joined: Mon Oct 22, 2018 6:32 pm

Gantt chart - row height

Hi!

Would like to narrow the row of height the Gantt chart, to show more activities, any way to achieve this ?

Thanks!

Bbest regards,
janir
bastss
Site Admin
Posts: 1212
Joined: Wed Oct 17, 2018 10:59 am

Re: Gantt chart - row height

Hello janir4!

It is possible to set height property for whole chart and Highcharts will automatically change heights for each cell, like in the example below: https://jsfiddle.net/Bastss/5x4j3svL/. However better solution is to create a function where we can set height for each cell and function will update whole chart depends on this height and number of data, like here: https://jsfiddle.net/Bastss/4fawex9t/.

Best regards!
Sebastian Wędzel,
Highcharts Developer
janir4
Posts: 7
Joined: Mon Oct 22, 2018 6:32 pm

Re: Gantt chart - row height

Hi bastss!

Thanks, I was looking elsewhere for a "row" setting.

I now set the height from the backing bean, works like a charm!

Best regards,
janir
alexdev2010
Posts: 1
Joined: Thu Jul 23, 2020 7:37 am

Re: Gantt chart - row height

bastss wrote: Mon Nov 05, 2018 3:17 pm Hello janir4!

It is possible to set height property for whole chart and Highcharts will automatically change heights for each cell, like in the example below: https://jsfiddle.net/Bastss/5x4j3svL/. However better solution is to create a function where we can set height for each cell and function will update whole chart depends on this height and number of data, like here: https://jsfiddle.net/Bastss/4fawex9t/.

Best regards!
Hey bastss,
This old answer helped me a lot. Thanks, for that.
Unfortunately, It won't work when parent-child groups are used. Collapsing the group causes a strange behavior, the parent row gets bigger.
Does any workaround get your mind?


Here a modified version of your script
https://jsfiddle.net/jpxgfkdr/2/
karolkolodziej
Posts: 895
Joined: Mon Mar 02, 2020 10:11 am

Re: Gantt chart - row height

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

You have to update the chart height also after collapsing the children as I did it in the demo.
To do this, I used the y-axis label group.

Live demo: https://jsfiddle.net/BlackLabel/uf5pznqb/

Feel free to contact us if further needed.
Regards!
karolkolodziej
Posts: 895
Joined: Mon Mar 02, 2020 10:11 am

Re: Gantt chart - row height

You might also use the yAxis property to set each row hight by setting the staticScale.
API: https://api.highcharts.com/gantt/yAxis.staticScale
Live demo: https://jsfiddle.net/BlackLabel/36k7vy8x/

Regards!

Return to “Highcharts Gantt”