spacing property

double spacing
final

Spacing between the bars. The value ranges from 0 to 1.

1 represents 100% and 0 represents 0% of the available space.

Spacing also affects the height of the bar. For example, setting 20% spacing and 100% height renders the bar with 80% of total height.

Defaults to 0.

Widget build(BuildContext context) {
  return SfCartesianChart(
    series: <BarSeries<SalesData, num>>[
      BarSeries<SalesData, num>(
        spacing: 0.5
      ),
    ],
  );
}

Implementation

final double spacing;