Is it possible to add more than one set of labels (at the top) on a Gantt chart?

« Back to message list

Enter your email address to get email updates on this topic. You can stop receiving updates by clicking the link in the update email messages.

Posted by Kedar on 26th April 2017
Hi Friends,
I want to add more than one labels on top of my gantt chart.
I want to show one label for Month, Another for week, then to show the gantt chart.
But only able to bind one label.

Any solution please.
I just set this like below:-

var gantt = new RGraph.Gantt({
                             id: 'cvs',
                             data: data,
                             options: {
                                 labels: WeeklyData,
                                 labelsAlign: 'top',
                                 xmax: XmaxValue,
                                 labelsPercent: true,
                                 backgroundGridAutofitNumvlines: XmaxValue,
                                 textAccessible: true,
                                 defaultcolor: 'rgba(6,200,150,1)',
Posted by Richard on 26th April 2017
Hi there,

Yes you could do that by using the drawing API X axis like this example does:

This one replace the axis with a new and doesn't use the Bar chart labels - but there's no reason why you can't have both. You will need to accommodate it though in the positioning of the X axis.

Posted by Kedar on 27th April 2017
Hi Richard,

My requirement is for Gantt Chart , not for bar chart.
I want to show weeks in labels and top of this to show months coming under which week.
For example 4 weeks coming under January, 4 weeks under February, this should show like below, and only top of the Gantt Chart.

    January February
1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |

In your example it can be,like below.

          India Australia
Team A | Team B | Team C | Team D | Team E | Team F

Please suggest if you have any solution for this.
Posted by Richard on 27th April 2017

You'd still use the drawing API X axis.


Add a reply

« Back to message list