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.
Up arrow icon