selectionGesture property

ActivationMode selectionGesture
final

Customizes the points or series selection behavior.

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

Defaults to [].

SelectionBehavior _selectionBehavior;

void initState() {
  _selectionBehavior = SelectionBehavior(enable: true);
  super.initState();
}

Widget build(BuildContext context) {
   return Container(
       child: SfFunnelChart(
          series: FunnelSeries<ChartData, String>(
                 initialSelectedDataIndexes: <int>[1,0],
                 selectionBehavior: _selectionBehavior
            ),
       )
  );
}

Gesture for activating the selection.

Selection can be activated in ActivationMode.none, ActivationMode.singleTap, ActivationMode.doubleTap, and ActivationMode.longPress.

Defaults to ActivationMode.singleTap.

Also refer ActivationMode.

SelectionBehavior _selectionBehavior;

void initState() {
  _selectionBehavior = SelectionBehavior(enable: true);
  super.initState();
}

Widget build(BuildContext context) {
   return Container(
       child: SfFunnelChart(
          selectionGesture: ActivationMode.singleTap,
          series: FunnelSeries<ChartData, String>(
                 selectionBehavior: _selectionBehavior
            ),
       )
  );
}

Implementation

/// Gesture for activating the selection.
///
/// Selection can be activated in `ActivationMode.none`, `ActivationMode.singleTap`,
/// `ActivationMode.doubleTap`, and `ActivationMode.longPress`.
///
/// Defaults to `ActivationMode.singleTap`.
///
/// Also refer [ActivationMode].
///
///```dart
///SelectionBehavior _selectionBehavior;
///
///void initState() {
///   _selectionBehavior = SelectionBehavior(enable: true);
///   super.initState();
///}
///
///Widget build(BuildContext context) {
///    return Container(
///        child: SfFunnelChart(
///           selectionGesture: ActivationMode.singleTap,
///           series: FunnelSeries<ChartData, String>(
///                  selectionBehavior: _selectionBehavior
///             ),
///        )
///   );
///}
///```
final ActivationMode selectionGesture;