isVisibleInLegend property

bool isVisibleInLegend
final

Toggles the visibility of the legend item of this specific series in the legend.

If it is set to false, the legend item for this series will not be visible in the legend.

Defaults to true.

Widget build(BuildContext context) {
   return Container(
       child: SfCartesianChart(
           series: <LineSeries<SalesData, String>>[
                  LineSeries<SalesData, String>(
                      isVisibleInLegend: true,
                 ),
            ],
       ));
}

Implementation

final bool isVisibleInLegend;