builder property

ChartWidgetBuilder? builder
final

Builder of the tooltip.

Defaults to null.

late TooltipBehavior tooltipBehavior;

void initState() {
  tooltipBehavior = TooltipBehavior(
    enable: true,
    builder: (dynamic data, dynamic point, dynamic series,
     int pointIndex, int seriesIndex) {
      return Container(
        height: 50,
        width: 100,
        decoration: const BoxDecoration(
          color: Color.fromRGBO(66, 244, 164, 1),
        ),
        child: Text('$pointIndex'),
      );
    }
  );
  super.initState();
}

Widget build(BuildContext context) {
  return SfCartesianChart(
    tooltipBehavior: tooltipBehavior
  );
}

Implementation

final ChartWidgetBuilder? builder;