margin property

EdgeInsets margin
final

Margin between the data label text and its shape.

Defaults to EdgeInsets.fromLTRB(5, 5, 5, 5).

Widget build(BuildContext context) {
  return SfCartesianChart(
    series: <SplineSeries<SalesData, num>>[
      SplineSeries<SalesData, num>(
        dataLabelSettings: DataLabelSettings(
          isVisible: true,
          margin: const EdgeInsets.all(2),
        ),
      ),
    ],
  );
}

Implementation

final EdgeInsets margin;