How to disable the trackball for a specific series in WPF SfChart?
This article describes how to disable the trackball for a specific series with in WPF SfChart . The ShowTrackballInfo property of CartesianSeries enable or disable the trackball label for a particular series as per the following code snippet. The default value of this property is true.
XAML:
<Syncfusion:SfChart> ….. <Syncfusion:SfChart.Behaviors> <Syncfusion:ChartTrackBallBehavior/> </Syncfusion:SfChart.Behaviors> <Syncfusion:SplineSeries ItemsSource="{Binding Collection1}" XBindingPath="XValue" YBindingPath="YValue"/> <Syncfusion:SplineSeries ItemsSource="{Binding Collection2}" XBindingPath="XValue" YBindingPath="YValue" ShowTrackballInfo="False"/> <Syncfusion:SplineSeries ItemsSource="{Binding Collection3}" XBindingPath="XValue" YBindingPath="YValue"/> </Syncfusion:SfChart>
C#:
SplineSeries series1 = new SplineSeries() { ItemsSource = view.Collection1, XBindingPath = "XValue", YBindingPath = "YValue" }; chart.Series.Add(series1); SplineSeries series2 = new SplineSeries() { ItemsSource = view.Collection2, XBindingPath = "XValue", YBindingPath = "YValue", ShowTrackballInfo = false }; chart.Series.Add(series2); SplineSeries series3 = new SplineSeries() { ItemsSource = view.Collection3, XBindingPath = "XValue", YBindingPath = "YValue", }; chart.Series.Add(series3);
Output
Conclusion
I hope you enjoyed learning about how to disable a trackball for a specific series 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 forums, Direct-Trac, or feedback portal. We are always happy to assist you!