legendIconType property

LegendIconType? legendIconType
final

Shape of the legend icon. Any shape in the LegendIconType can be applied to this property. By default, icon will be rendered based on the type of the series.

Defaults to LegendIconType.seriesType.

Also refer LegendIconType.

Widget build(BuildContext context) {
  return SfCartesianChart(
    legend: Legend(isVisible:true),
    series: <LineSeries<SalesData, String>>[
      LineSeries<SalesData, String>(
        legendIconType: LegendIconType.diamond,
      ),
    ],
  );
}

Implementation

final LegendIconType? legendIconType;