toggleSeriesVisibility property

bool toggleSeriesVisibility
final

Toggles the series visibility.

If it is set to false, then on tapping the legend item, series visibility will not be toggled.

Defaults to true

Widget build(BuildContext context) {
   return Container(
       child: SfCartesianChart(
           legend: Legend(
              isVisible: true,
              toggleSeriesVisibility: false)
       ));
}

Implementation

final bool toggleSeriesVisibility;