Access Data from Trackball

Hallo,

is it possible to get the data from the Trackball?

Thanks,

Markus


1 Reply

NT Nitheeshkumar Thangaraj Syncfusion Team September 6, 2023 09:30 AM UTC

Hi Markus,


We would like to inform you that we have obtained the data points by overriding the LabelsGenerated method to meet your requirements. The code snippet and API link are provided below.


public class CustomTrackball : ChartTrackballBehavior

{

    protected override void LabelsGenerated(List<TrackballPointInfo> pointInfos)

    {

        foreach (TrackballPointInfo point in pointInfos)

        {

           // you can access point info related to each creation of trackball

        }

 

        base.LabelsGenerated(pointInfos);

    }

}


<chart:SfCartesianChart.TrackballBehavior>

                <local:CustomTrackball />

</chart:SfCartesianChart.TrackballBehavior>


API link - https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Charts.ChartTrackballBehavior.html#Syncfusion_Maui_Charts_ChartTrackballBehavior_LabelsGenerated_System_Collections_Generic_List_Syncfusion_Maui_Charts_TrackballPointInfo__



If you need any further assistance, feel free to ask.


Regards,

Nitheeshkumar.


Loader.
Up arrow icon