decimalPlaces property

int decimalPlaces
final

Specifies the number decimals to be displayed in tooltip text.

Defaults to 3.

late TooltipBehavior tooltipBehavior;

void initState() {
  tooltipBehavior = TooltipBehavior(
    enable: true,
    decimalPlaces: 1
  );
  super.initState();
}

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

Implementation

final int decimalPlaces;