onDataLabelRender property
Occurs when tapping the axis label. Here, you can get the appropriate axis that is tapped and the axis label text.
Widget build(BuildContext context) {
return Container(
child: SfCartesianChart(
onDataLabelRender: (DataLabelRenderArgs args) => dataLabel(args),
)
);
}
void dataLabel(DataLabelRenderArgs args) {
args.text = 'data Label';
}
Implementation
final ChartDataLabelRenderCallback? onDataLabelRender;