When i have one data onTooltipRender is not calling

i have my own custom tool tip . for showing my tooltip i got the data from

onTooltipRender function of graph but when i have one data and i click on that marker default tooltip is showing .
onTooltipRender is not calling when i have one data .
When i click on that single marker i am getting this issue .Please check the attached screen shot and provide  appropriate solution for this.


bellow is my code. i want to render onTooltipRender if i have only one





onTooltipRender: (TooltipArgs args) => tool(args),
tool(TooltipArgs args) {
if (personalMetricData.isNotEmpty) {
WidgetsBinding.instance?.addPostFrameCallback((_) {
setState(() {
showTooptip = true;
showlastTooptip = false;
dx = args.locationX;
dy = args.locationY;
selectIndex = args.pointIndex;
subtitle =
'${personalMetricData[selectIndex].percentage.toInt().toDouble().toStringAsFixed(1)}%';
boxColor = personalMetricData[selectIndex].percentage.isNegative
? AppColors.toolTipRed
: AppColors.parrotGreen;
headerValue =
'${personalMetricData[selectIndex].data.toDouble().toStringAsFixed(1)}';
suffixValue = widget.type;
// '${widget.type == 'topSpeed' ? 'km/h' : widget.type == 'totalDistance' ? 'km' : widget.type == 'possesion' ? '%' : 'min'}';
});
});
}
}

2 Replies

MG Marismathan Gurusamy Syncfusion Team March 31, 2022 02:15 PM UTC

Hi Vikram,


Greetings from Syncfusion. We have gone through the query which you have mentioned and this was already fixed from our side. This will be available in our upcoming patch the release and we will update you once release got rolled out, we appreciate your patience until then.


Thanks,

Marismathan G



YG Yuvaraj Gajaraj Syncfusion Team April 12, 2022 10:07 PM UTC

Hi Vikram,


Thanks for your patience. The issue has been fixed and rolled out in our weekly patch release. To avoid this kindly upgrade the chart package to the version below.


Version: https://pub.dev/packages/syncfusion_flutter_charts/versions/20.1.48


Regards,

Yuvaraj.


Loader.
Up arrow icon