textAlignment property

ChartAlignment textAlignment
final

Alignment of the text in the tooltip.

Defaults to ChartAlignment.center.

late TooltipBehavior tooltipBehavior;

void initState() {
  tooltipBehavior = TooltipBehavior(
    enable: true,
    textAlignment : ChartAlignment.near
  );
  super.initState();
}

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

Implementation

final ChartAlignment textAlignment;