How to put a text label on each segement of a gantt chart

I want to add a text label to each of the segments in my gantt chart.  Is there a way to do this?  I've included a picture of what I'm trying to accomplish.

Thanks,
Jared


Text_on_gantt_chart_sample_d926182d.zip

3 Replies

MK Muneesh Kumar G Syncfusion Team November 22, 2013 05:08 AM UTC

Hi Jared,

Thanks for using Syncfusion products.

We can achieve your requirements by setting Annotations as per the below code snippet.

Code Snippet[XAML]:

<chart:ChartSeries.Annotations>

 

<chart:AnnotationsCollection>

 

<chart:ChartSeriesAnnotation x:Name="serAnnot1"

X="0" Y="35"

Description="Stage 1"

Template="{StaticResource LabelTemplate}"

Stroke="Black"

Fill="Orange"></chart:ChartSeriesAnnotation>

 

<chart:ChartSeriesAnnotation x:Name="serAnnot2"

X="1" Y="50"

Description="Stage 2"

Template="{StaticResource LabelTemplate}"

Stroke="Black"

Fill="Orange"></chart:ChartSeriesAnnotation>

 

……….

 

</chart:AnnotationsCollection>

 

</chart:ChartSeries.Annotations>

We have prepared a sample based on this and you can find the sample under the following location:

Sample : http://www.syncfusion.com/downloads/support/directtrac/general/GanttChart-982778748.zip

Please let us know if you have any queries.

Regards,

Muneesh Kumar G.



JS Jared Stokes January 21, 2014 03:28 PM UTC

Is there any way to do this in the code behind?  As it is unknown where/how many chart segments will exist until run time.


KV Karthikeyan V Syncfusion Team January 22, 2014 11:18 AM UTC

Hi Jared,

Thanks for the update.

We have analysed the reported requirement and we have prepared a sample based on this. Please find the sample under the following location.

Please let us know if you have any query.

Thanks,

Karthikeyan V.

 



GanttChart_f034c2ea.zip

Loader.
Up arrow icon