labelAlignment property

ChartDataLabelAlignment labelAlignment
final

Position of the data label.

Note: This is applicable for Cartesian chart.

Defaults to ChartDataLabelAlignment.auto.

Also refer ChartDataLabelAlignment.

Widget build(BuildContext context) {
  return SfCartesianChart(
    series: <SplineSeries<SalesData, num>>[
      SplineSeries<SalesData, num>(
        dataLabelSettings: DataLabelSettings(
          isVisible: true,
          labelAlignment: ChartDataLabelAlignment.top
        ),
      ),
    ],
  );
}

Implementation

final ChartDataLabelAlignment labelAlignment;