RohitKatarya7
Posts: 3
Joined: Wed Nov 03, 2021 9:14 am

Gantt highchart bar alignment issue

Thanks for this great library it resolves most of my problems. But in the current one I am having an issue in which the alignment of the task bars are not correct. They are half above than mentioned lines. Can you please assist me on it.

Codepen link: https://codepen.io/rohitkatarya7/pen/rNzYdVB
mateusz.b
Posts: 2006
Joined: Tue Jul 13, 2021 11:34 am

Re: Gantt highchart bar alignment issue

Hello RohitKatarya7,

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

Removing fixed height and uniqueNames:true should help in this case.
Demo: https://jsfiddle.net/BlackLabel/jq0gL65v/

Let me know if you have any further questions!
Best regards!
Mateusz Bernacik
Highcharts Developer
RohitKatarya7
Posts: 3
Joined: Wed Nov 03, 2021 9:14 am

Re: Gantt highchart bar alignment issue

Thanks for your response.

But I will get one name multiple times in my data but I want to show that name once on the chart but their owner, start time and end time will be different and these are displayed with different color also. Is there any way to do so?
RohitKatarya7
Posts: 3
Joined: Wed Nov 03, 2021 9:14 am

Re: Gantt highchart bar alignment issue

Hi @mateusz.b,

I have updated codepen code as follows. Everything is fine in it but there is lot of space coming around the locations. I have put an height on this to reduce this spacing but it cause another alignment issue which I have shared above. Can you assist me on this.

Codepen Link: https://codepen.io/rohitkatarya7/pen/porVwep
mateusz.b
Posts: 2006
Joined: Tue Jul 13, 2021 11:34 am

Re: Gantt highchart bar alignment issue

Hello RohitKatarya7,

I took a closer look at the problem, and it is most likely a bug. Here is related GH issue: https://github.com/highcharts/highcharts/issues/11796
It had been closed a while ago but I have just reopened it. As you can see, there is a suggested workaround in the issue, but when I tried to apply it to your case, it turned out that the results are not great, because of number of points.
Demo: https://jsfiddle.net/BlackLabel/d9p15w7k/

I will talk with the developer who suggested that workaround in order to find something that would fit your case better. At the same time I encourage you to leave a feedback in mentioned issue, even short message. I wish I could help your more but that's all what I can do for now.

Regards!
Mateusz Bernacik
Highcharts Developer

Return to “Highcharts Gantt”