Hi Arnold,
The trackball builder in does not directly provide detailed data point information like the tooltip builder. To achieve the requirement, we used the object to extract the and , 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