Articles in this section
Category / Section

How to manage the empty values in WPF Chart (SfChart)?

3 mins read

This article explains how to manage empty points, often referred to as NaN (Not a Number) in WPF Chart (SfChart). Syncfusion® SfChart provides functionality to show or hide empty points in the chart area using specific properties.


Implementation Details:

In a WPF Chart, you can manage the display of empty points within a series by using the ShowEmptyPoints property. To visually differentiate empty points from regular data points, utilize the EmptyPointStyle property.

 

XAML Example:

<!--Showing empty points in charts-->
<syncfusion:ColumnSeries ShowEmptyPoints="True" EmptyPointStyle="SymbolAndInterior"  XBindingPath="Year" YBindingPath="Count" ItemsSource="{Binding}"> 

C# Example:

private void MyChart()
{
  ColumnSeries series = new ColumnSeries();
  series.ShowEmptyPoints = true;
  series.EmptyPointStyle = EmptyPointStyle.SymbolAndInterior;
}

Output:

WPF Chart displays Empty Points in Chart Area


Conclusion

I hope you enjoyed learning about how to manage the empty values in WPF Chart(SfChart).

You can refer to our WPF Chart’s feature tour page to know about its other groundbreaking feature representations. You can also explore our   WPF Chart documentation to understand how to present and manipulate data.


For current customers, you can check out our WPF components from the License and Downloads page. If you are new to Syncfusion®, you can try our 30-day free trial to check out our WPF Chart and other WPF components.


If you have any queries or require clarifications, please let us know in comments below. You can also contact us through our support forumsDirect-Trac, or feedback portal. We are always happy to assist you!

 

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please  to leave a comment
Access denied
Access denied