initialSelectedDataIndexes property

List<int>? initialSelectedDataIndexes
final

List of data indexes to initially be selected.

Defaults to null.

Widget build(BuildContext context) {
  return SfCartesianChart(
    series: <BarSeries<SalesData, num>>[
      BarSeries<SalesData, num>(
        selectionBehavior: SelectionBehavior(
          enable:true
        ),
        initialSelectedDataIndexes: <int>[0]
      ),
    ],
  );
}

Implementation

final List<int>? initialSelectedDataIndexes;