onTooltipRender property
Occurs while tooltip is rendered. You can customize the position and header. Here, you can get the text, header, point index, series, x and y-positions.
late TooltipBehavior _tooltipBehavior;
@override
void initState() {
_tooltipBehavior = TooltipBehavior(enable: true);
super.initState();
}
Widget build(BuildContext context) {
return Container(
child: SfCircularChart(
tooltipBehavior: _tooltipBehavior,
onTooltipRender: (TooltipArgs args) => tool(args)
)
);
}
void tool(TooltipArgs args) {
args.locationX = 30;
}
Implementation
final CircularTooltipCallback? onTooltipRender;