format property Null safety

String? format
final

Formats the tooltip text.

By default, the tooltip will be rendered with x and y-values.

You can add prefix or suffix to x, y, and series name values in the tooltip by formatting them.

late TooltipBehavior tooltipBehavior;

void initState() {
  tooltipBehavior = TooltipBehavior(
    enable: true,
    format:'point.y %'
  );
  super.initState();
}

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

Implementation

final String? format;