hing
Posts: 2
Joined: Wed Nov 02, 2022 8:39 am

Gantt chart with seasons on xAxis

I have a custom x-axis just like this:
wrong.png
wrong.png (36.3 KiB) Viewed 579 times
but I dont want repeat the custom html when cross year
I need like this:
right.png
right.png (30.86 KiB) Viewed 579 times
when go to next year, the custom label will not repeat
thanks
michal.f
Posts: 1114
Joined: Thu Aug 12, 2021 12:04 pm

Re: Gantt chart with seasons on xAxis

Hello,

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

Could you send us a simplified demo with the code you generate these labels with? It will make it easier for me to help because at the moment I'm not sure how you do it.

You can create this demo based on this: https://jsfiddle.net/BlackLabel/yj34a9ew/

Best regards!
Michał Filipiec
Highcharts Developer
https://blacklabel.pl/highcharts/
hing
Posts: 2
Joined: Wed Nov 02, 2022 8:39 am

Re: Gantt chart with seasons on xAxis

Hello,

Thanks for your reply.

I have edited a demo at: https://jsfiddle.net/vzbfcmp6/
michal.f
Posts: 1114
Joined: Thu Aug 12, 2021 12:04 pm

Re: Gantt chart with seasons on xAxis

Hello,

The example you sent is not entirely a good solution, it is limited and imprecise. Unfortunately, using the basic API settings it is not possible to show the seasons.

Due to the fact that there is no specific example with the seasons and it seems like a nice example so I spent more time and prepared a demo generating labels with seasons instead of years using SVGRenderer in the chart.event.render() callback function.

Demo: https://jsfiddle.net/BlackLabel/mfjt4gab/
API: https://api.highcharts.com/highcharts/c ... nts.render
SVGRenderer: https://api.highcharts.com/class-refere ... VGRenderer

I also changed the title of the topic to make it easier to search for it in google.

Let me know if you have any further questions!
Best regards!
Michał Filipiec
Highcharts Developer
https://blacklabel.pl/highcharts/

Return to “Highcharts Gantt”