We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Gantt chart with multiple "label lines"

Hi
 
I am creating Gantt chart and want to have quite bigger "header" than just a date.
 
Firstly I added week numbers instead of seperated dates.
 
 
How can I center them for a cell. Now they are right above vertical line.
Now I also want a Month name JUST ONCE ceneterd above all week numbers
Similarly I want the year above the month names, also cenetered are written only once
 
Is it possible to add label in multiple layers like this?


Gantt_bfbc2200.zip

1 Reply

AT Anandaraj T Syncfusion Team February 11, 2014 02:32 AM UTC

Hi Gerda Diteriha,

Thanks for using Syncfusion products.

We suggest you to use grouping labels for displaying axis labels in multiple lines.

Please refer the following code snippet to achieve this.
<code>
[CS]
            //Grouping label for multiple layers
            ChartAxisGroupingLabel cagl = new ChartAxisGroupingLabel(new DoubleRange(dt.ToOADate(), dt.AddDays(3).ToOADate()), "Quarter1");                       
            this.chartControl1.PrimaryXAxis.GroupingLabels.Add(cagl);
</code>

For your convenience, we have created a simple sample with grouping labels and it can be downloaded from the below link.

For more information about grouping labels, please refer our online documentation in the following link:
Grouping Labels

Please let us know if you have any concern.

Regards,
Anand

Attachment: Gantt_Chart_a62c1826.zip

Loader.
Up arrow icon