2X faster development
The ultimate WPF UI toolkit to boost your development speed.
This KB explains how to show a custom data marker in the WPF Chart.
You can show the custom adornment symbols in series using the ChartAdornmentInfo SymbolTemplate property by the following steps.
Define the desired symbol in the ResourceDictionary using the DataTemplate. And assign the declared DataTemplate to the SymbolTemplate property of ChartAdornmentInfo as per the following code snippet.
<syncfusion:SfChart > <syncfusion:SfChart.Resources> <ResourceDictionary> <DataTemplate x:Key="crossTemplate"> <Grid Height="15" Width="15"> <Path Stretch="Fill" Stroke="{Binding Interior}" Fill="{Binding Interior}" Data="F1 M 133.133,45.7109L 154.307, 24.5363L 175.482,45.7109L 154.307,66.8856L 175.482,88.0603L 154.307,109.235L 133.133,88.0603L 111.958,109.235L 90.7835, 88.0603L 111.958,66.8856L 90.7835,45.7109L 111.958,24.5363L 133.133,45.7109 Z " /> </Grid> </DataTemplate> </ResourceDictionary> </syncfusion:SfChart.Resources> ……… <syncfusion:LineSeries ItemsSource="{Binding Data}" XBindingPath="XValue" YBindingPath="YValue"> <syncfusion:LineSeries.AdornmentsInfo> <syncfusion:ChartAdornmentInfo SymbolTemplate="{StaticResource crossTemplate}"> </syncfusion:ChartAdornmentInfo> </syncfusion:LineSeries.AdornmentsInfo> </syncfusion:LineSeries> </syncfusion:SfChart>
Output:See also: How to show multiple custom data marker based on value in chart series |
2X faster development
The ultimate WPF UI toolkit to boost your development speed.
This page will automatically be redirected to the sign-in page in 10 seconds.