onLegendItemRender property

PyramidLegendRenderCallback? onLegendItemRender
final

Occurs while the legend is rendered.

Here, you can get the legend's text, shape, series index, and point index case of the pyramid series.

Widget build(BuildContext context) {
   return Container(
       child: SfPyramidChart(
           legend: Legend(isVisible: true),
           onLegendItemRender: (LegendRendererArgs args) => legend(args),
       )
   );
}
void legend(LegendRendererArgs args) {
  args.legendIconType = LegendIconType.diamond;
}

Implementation

final PyramidLegendRenderCallback? onLegendItemRender;