selectionGesture property Null safety

ActivationMode selectionGesture
final

Data points or series can be selected while performing interaction on the chart.

It can also be selected at the initial rendering using this property.

Defaults to [].

Widget build(BuildContext context) {
   return Container(
       child: SfFunnelChart(
          series: FunnelSeries<ChartData, String>(
                 initialSelectedDataIndexes: <int>[1,0],
                 selectionSettings: SelectionSettings(
                   selectedColor: Colors.red,
                   unselectedColor: Colors.grey
                 ),
               ),
       ));
}

Gesture for activating the selection.

Selection can be activated in tap, double tap, and long press.

Defaults to ActivationMode.tap.

Also refer ActivationMode

Widget build(BuildContext context) {
   return Container(
       child: SfFunnelChart(
          selectionGesture: ActivationMode.singleTap,
          series: FunnelSeries<ChartData, String>(
                 selectionSettings: SelectionSettings(
                   selectedColor: Colors.red,
                   unselectedColor: Colors.grey
                 ),
               ),
       ));
}

Implementation

///Gesture for activating the selection.
///
///Selection can be activated in tap, double tap, and long press.
///
///Defaults to `ActivationMode.tap`.
///
///Also refer [ActivationMode]
///
///```dart
///Widget build(BuildContext context) {
///    return Container(
///        child: SfFunnelChart(
///           selectionGesture: ActivationMode.singleTap,
///           series: FunnelSeries<ChartData, String>(
///                  selectionSettings: SelectionSettings(
///                    selectedColor: Colors.red,
///                    unselectedColor: Colors.grey
///                  ),
///                ),
///        ));
///}
///```
final ActivationMode selectionGesture;