onDataLabelRender property

ChartDataLabelRenderCallback? onDataLabelRender

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),
         series: <CartesianSeries<ChartData, String>>[
        ColumnSeries<ChartData, String>(
          dataLabelSettings: DataLabelSettings(isVisible: true),

void dataLabel(DataLabelRenderArgs args) {
  args.text = 'data Label';


final ChartDataLabelRenderCallback? onDataLabelRender;