yyshah
Posts: 6
Joined: Tue Jan 25, 2022 8:35 pm

Extend PlotLines to xAxis Labels in Gantt Chart

Hi


I am trying to make the plotLine to also extend xAxis label for current day and have a dot lineCap as below
test.png
test.png (16.12 KiB) Viewed 994 times
I also want to make the yAxis labels fixed width to have a fixed width table for dynamically changing labels

https://jsfiddle.net/YameenYasin/hnopLwtb/

Could you help me with how can i acheive the above. Thanks for helping
michal.f
Posts: 1114
Joined: Thu Aug 12, 2021 12:04 pm

Re: Extend PlotLines to xAxis Labels in Gantt Chart

Hello,

Thanks for contacting us with your question!

You can use SVG Renderer to draw these elements.

Demo: https://jsfiddle.net/BlackLabel/6bnk4u2a/
API: https://api.highcharts.com/class-refere ... VGRenderer

Let me know if you have any further questions!
Best regards!
Michał Filipiec
Highcharts Developer
https://blacklabel.pl/highcharts/
yyshah
Posts: 6
Joined: Tue Jan 25, 2022 8:35 pm

Re: Extend PlotLines to xAxis Labels in Gantt Chart

Great !! This is exactly what i needed. Thanks a lot for your help !!

Another challenge i am facing is making the yAxis Column fixed width. I am trying to add some blank spaces to category names but this doesnot seem to work well. Do you have any tips around this ?

Thanks
michal.f
Posts: 1114
Joined: Thu Aug 12, 2021 12:04 pm

Re: Extend PlotLines to xAxis Labels in Gantt Chart

Hi,

API doesn't have that option, but you can achieve this by setting yAxis.labels.useHTML on true and adding DIV with CSS styles in yAxis.labels.format property.

Demo: https://jsfiddle.net/BlackLabel/mjavn9q5/
API: https://api.highcharts.com/gantt/yAxis.labels.useHTML
https://api.highcharts.com/gantt/yAxis.labels.format

Feel free to ask any further questions!
Best regards!
Michał Filipiec
Highcharts Developer
https://blacklabel.pl/highcharts/
yyshah
Posts: 6
Joined: Tue Jan 25, 2022 8:35 pm

Re: Extend PlotLines to xAxis Labels in Gantt Chart

Thanks, this is helpful ..
michal.f
Posts: 1114
Joined: Thu Aug 12, 2021 12:04 pm

Re: Extend PlotLines to xAxis Labels in Gantt Chart

You're welcome! In case of any further questions, feel free to contact us again.

Best regards!
Michał Filipiec
Highcharts Developer
https://blacklabel.pl/highcharts/

Return to “Highcharts Gantt”