onLegendItemRender property

PyramidLegendRenderCallback? onLegendItemRender

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;


final PyramidLegendRenderCallback? onLegendItemRender;