alignment property Null safety

ChartAlignment alignment
final

Alignment of the data label.

The data label can be aligned far, near, or center of the data point position.

Defaults to ChartAlignment.center.

Also refer ChartAlignment.

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

Implementation

final ChartAlignment alignment;