sugiyama
Posts: 2
Joined: Wed Sep 18, 2024 8:35 am

how to hide

i'm creating gantt like this demo. if owner is empty, I want to connect Task and Owner columns. Please tell me how to connect or hide vertical line depends on data.
https://www.highcharts.com/demo/gantt/treegrid-columns
Attachments
スクリーンショット 2024-09-18 17.39.37.png
スクリーンショット 2024-09-18 17.39.37.png (13.68 KiB) Viewed 753 times
andrzej.b
Posts: 131
Joined: Mon Jul 15, 2024 12:34 pm

Re: how to hide

Hi Sugiyama,

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

There is no direct option in the API to get what you need. But, Highcharts are flexible, and we can hide the vertical line with a smart use of useHTML option for empty labels combined with CSS. We can add an empty div and position it to cover the line when there is no label.
I have prepared a sample implementation of this strategy for you, please see the fiddle: https://jsfiddle.net/BlackLabel/9zx8koyg/

It is a workaround and may need some adjustment for your use case, but I hope you will find it useful.

Let me know if that is what you were looking for!

Best regards,
Andrzej
sugiyama
Posts: 2
Joined: Wed Sep 18, 2024 8:35 am

Re: how to hide

Hi, thank you for replying!

It seems a little difficult, but I'm glad to know that it can be done.Thank you

Return to “Highcharts Gantt”