Articles in this section
Category / Section

How to disable a trackball for a specific series?

1 min read

This article describes how to disable the trackball for a specific series. By using the ShowTrackballInfo property of CartesianSeries, we can enable or disable the trackball label for a particular series as per the following code snippet, and 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

Disable the trackball for a specific series in WPF chart(SfChart).

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