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
close icon

Dotted line in chart

Hello,

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

Use the below code for line chart

<chart:LineSeries EnableAnimation="True" AnimationDuration="00:00:01" Palette="None" Interior="Brown" 
                    ItemsSource="{Binding Points}" XBindingPath="Name" YBindingPath="Value" >
                    
                </chart:LineSeries>

Thank in advance,

Have a nice day.

1 Reply

KV Karthikeyan V Syncfusion Team February 26, 2014 09:06 AM UTC

Hi Shameer,

Thank you for using Syncfusion products.

We have analysed your requirement and this can be achieved with the help of the CustomTemplate property.

Code Snippet [XAML]:

<chart:LineSeries.CustomTemplate>

                        <DataTemplate>

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

                        </DataTemplate>

</chart:LineSeries.CustomTemplate>

Please let us know if you require further assistance on this.

Thanks,

Karthikeyan V.


Loader.
Live Chat Icon For mobile
Up arrow icon