pointColorMapper property

  1. @override
ChartIndexedValueMapper<Color>? pointColorMapper

Maps the field name, which will be considered as data point color.

Defaults to null.

Widget build(BuildContext context) {
   return Container(
       child: SfPyramidChart(
           series: PyramidSeries<ChartData, String>(
              xValueMapper: (ChartData data, _) => data.xVal,
              yValueMapper: (ChartData data, _) => data.yVal,
              pointColorMapper: (ChartData data, _) => data.pointColor,
class ChartData {
  ChartData(this.xVal, this.yVal, [this.pointColor]);
  final String xVal;
  final int yVal;
  final Color pointColor;


final ChartIndexedValueMapper<Color>? pointColorMapper;