Dragos
Posts: 4
Joined: Mon Dec 23, 2013 7:11 pm

Multiple Gantt xAxis with fixed units, formatting and quarters

Hello, we are trying to build a custom gantt chart, with ability to have dynamic xAxis depending on the settings type, but we run into multiple issues.

We are trying to do a simple case, which is have first xAxis, years, second xAxis, quarters.

So,first step, the chart with quarters works ( ignore the number, we use formatter )

https://jsfiddle.net/Resems/fhktLr3s/10/

in the moment we add the 2 xAxis, and set the units to years, it stops working

https://jsfiddle.net/Resems/fhktLr3s/17/

due note, it matters in which order you put the xAxis, if you switch around you get a working chart but the axis does not stick to units.

https://jsfiddle.net/Resems/fhktLr3s/16/

Is there any possible workarounds, or other solutions?

Another question related to this.

Sometimes the first/last label is not displayed, but
https://jsfiddle.net/Resems/fhktLr3s/21/ example one
https://jsfiddle.net/Resems/fhktLr3s/23/ example two

it is possible to force displays values in this case?
magdalena
Posts: 517
Joined: Tue Aug 24, 2021 1:32 pm

Re: Multiple Gantt xAxis with fixed units, formatting and quarters

Hello,

We appreciate you reaching out to us!

I can see you have already reported it on our GitHub issues tracker here: https://github.com/highcharts/highcharts/issues/16626
Please, continue this thread there and for the future, please do not duplicate topics on different support channels.

When it comes to the second question, I'm not sure if I understood correctly, but I suppose the problem is with the correct implementation.
If we take your previous example https://jsfiddle.net/BlackLabel/wa9z5omv/ labels show correctly.

Let me know if that was what you were looking for,
Regards!
Magdalena Gut
Developer and Highcharts Support Engineer
Dragos
Posts: 4
Joined: Mon Dec 23, 2013 7:11 pm

Re: Multiple Gantt xAxis with fixed units, formatting and quarters

Hello,

I reported the github issue indeed, because it was a breaking bug.

Here i wanted to find a solution for both a question and a bug.

To clarify the second question, the white space in
https://jsfiddle.net/Resems/fhktLr3s/21/
Where it should be 2014
Image

Can be solved somehow ?

Sometimes the labels are not displayed entirely, on different units, specifically in the above case
Also, i can provide multiple screenshots on different sizes and dimensions with different units having the same problem.

Thank you.

I also have a different question, on gantt, xAxis labels width, should i start a new thread or post it here as well?
magdalena
Posts: 517
Joined: Tue Aug 24, 2021 1:32 pm

Re: Multiple Gantt xAxis with fixed units, formatting and quarters

Hi,

Referring to your first question, until our GitHub developers check it and you will get a reply in a ticket, I would recommend to don't setting units on the second Axis. It will be work anyway because it takes the default value.

When it comes to the years labels, you have a lot of unnecessary code for one axis only. If you don't need month Axis anymore you can just hide it and years Axis will work correctly. Here is the example:

Demo:
https://jsfiddle.net/BlackLabel/6vznxry2/

Regarding label width, you can create a new post because is not related to this thread.

Let me know if you have any further questions,
Regards!
Magdalena Gut
Developer and Highcharts Support Engineer

Return to “Highcharts Gantt”