Column Series

How can we get complete object in the trackball for getting the data like we have in the tool tip where we have the entire model of the data.


Attachment: Chart_Data_a9f03578.pdf

1 Reply

MR Mugunthan Ramalingam Syncfusion Team June 17, 2025 12:37 PM UTC

Hi Arnold,

 
The trackball builder in SfCartesianChart does not directly provide detailed data point information like the tooltip builder. To achieve the requirement, we used the TrackballDetails object to extract the pointIndex and seriesIndex, which allowed us to access the data points. Using the point index, we retrieved the full data object from the chart's data list and used it to display trackball tooltip with all the details from the data points. 
 

We have shared the sample for your reference, and you can customize it further based on your specific requirements.

 

Code snippet:

. . .

builder: (BuildContext context, TrackballDetails trackballDetails) {

 final int? pointIndex = trackballDetails.pointIndex;

 final int? seriesIndex = trackballDetails.seriesIndex;

 if (pointIndex != null && seriesIndex != null) {

   final DailyTrade dataPoint = tradeData[pointIndex];

   return  _buildTooltipContentForWinAndLoose(dataPoint);

 }

 return Container();

},


Demo:
 

 

 

 

Regards,

Mugunthan.



Attachment: fr_196992_f6e36957.zip

Loader.
Up arrow icon