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.
Unfortunately, activation email could not send to your email. Please try again.

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

Thread ID:

Created:

Updated:

Platform:

Replies:

114500 Nov 21,2013 11:49 AM Jan 22,2014 06:18 AM WPF 3
loading
Tags: Chart
Jared Stokes
Asked On November 21, 2013 11:49 AM

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

Muneesh Kumar G [Syncfusion]
Replied On November 22, 2013 12:08 AM

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.


Jared Stokes
Replied On January 21, 2014 10:28 AM

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.

Karthikeyan V [Syncfusion]
Replied On January 22, 2014 06:18 AM

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

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;