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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Dotted line in chart

Thread ID:





109575 Jun 20,2013 02:36 PM UTC Jul 1,2013 10:12 AM UTC Silverlight 3
Tags: Chart
Asked On June 20, 2013 02:36 PM UTC


I would like to create a dotted (or dashed) line in a chart.

Thank in advance,

Have a nice day.

Sheik Syed Abthaheer M [Syncfusion]
Replied On June 21, 2013 12:58 PM UTC

Hi Anthony,


Thanks for using Syncfusion products.


You can achieve your requirement (Dotted LineSeries) by overriding custom Line Chart template as shown in the given code snippet.


Code Snippet [Xaml]:

<DataTemplate x:Key="LineSegment">

   <Canvas Background="Transparent" HorizontalAlignment="Left" VerticalAlignment="Top">

      <Line Stroke="{Binding Interior}" StrokeThickness="{Binding StrokeThickness}"                                  StrokeDashArray="1,1"  X1="{Binding X1}" X2="{Binding X2}" Y1="{Binding Y1}" Y2="{Binding Y2}" Opacity="{Binding Opacity}"/>



<syncfusion:ChartSeries Type="Line” SegmentTemplate="{StaticResource LineSegment}" DataSource="{Binding power}" BindingPathX="Year" BindingPathsY="ind" />


We have prepared the sample based on your requirement. Please download it from the given below location.


Please let us know if you have any queries.



M. Sheik


Replied On June 27, 2013 02:19 PM UTC

Thanks for the answer.

Can you give me the way to do that by code, in our project we create series from code.
I use syncfusion 10.2 version, does it change something in the exemple ?


Sheik Syed Abthaheer M [Syncfusion]
Replied On July 1, 2013 10:12 AM UTC

Hi Anthony,

Thanks for your update.

We have prepared the dotted lineChart programmatically(by using C#) based on your requirement.

Please find the sample from the given below location.

Please let us know if you have any queries.


M. Sheik



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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon