simone.zanaboni
Posts: 3
Joined: Mon Jan 11, 2021 3:22 pm

Gantt chart alternate row background color

Hi,
I'm trying to display a gantt chart where every row has a background color, specifically gray on odd rows and white on even ones.
I'm using alternateGridColor and chartBackgroundColor to achieve the following:
https://jsfiddle.net/jur8dm1c/8/

I also want every label to have the same background color as the row inside the grid, but I have not found any useful option so far.
Is there a way to achieve that?

Best regards,
Simone Zanaboni
User avatar
sebastian.h
Posts: 1734
Joined: Fri Aug 07, 2020 7:08 am

Re: Gantt chart alternate row background color

Hi Simone!
Thanks for contacting us with your question.

Generally, it's impossible to change the background, in the API you can't found options for change the row.
You can use SVGrenderer and render rect with background, but I think in the yAxis like menu it's more complicated to implement.

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

API References:
https://api.highcharts.com/class-refere ... VGRenderer

Let me know if this solution is useful.
Best regards.
Sebastian Hajdus
Highcharts Developer

Return to “Highcharts Gantt”