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.
Syncfusion Feedback

Dotted line in chart

Thread ID:

Created:

Updated:

Platform:

Replies:

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

Hello,

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}"/>

    /Canvas>

</DataTemplate>

<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.

 

Regards,

M. Sheik



DottedLineChart_8732b170.zip

Anthony PALLINI
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 ?


regards.


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.

Regards,

M. Sheik



DottedLineChart_e5a6e4f.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.

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

;