Category / Section
How to draw dotted line in WPF Chart (SfChart)?
1 min read
You can customize the visualization of the series by using the CustomTemplate property in LineSeries of WPF Chart (SfChart). In the following example, the DataTemplate property is used with a line in it. Set the StrokeDashArray, and bind the values for X1, X2, X3, and X4 to customize the line series as dotted line.
XAML
<Syncfusion:LineSeries ItemsSource="{Binding}" XBindingPath="CompanyName" Palette="Metro" YBindingPath="CompanyTurnOver">
<!-- Customtemplate for draw Dotted line in LineSeries-->
<Syncfusion:LineSeries.CustomTemplate>
<DataTemplate>
<Line StrokeDashArray="1,1" X1="{Binding X1}" StrokeThickness="3" X2="{Binding X2}" Y1="{Binding Y1}" Y2="{Binding Y2}" Stroke="Green"/>
</DataTemplate>
</Syncfusion:LineSeries.CustomTemplate>
</Syncfusion:LineSeries>
Did not find the solution
Contact Support