how to change legend colour in SfCircularChart in flutter

84

child: SfCircularChart(
    title: ChartTitle(text: 'Advances'),
    palette: const <Color>[
      Color(0xFFffc107),
      Color(0xFF0386E8),
    ],
    legend: Legend(
      isVisible: true,
      overflowMode: LegendItemOverflowMode.wrap,
      position: LegendPosition.left,
    ),
    tooltipBehavior: _tooltipData,
    series: <CircularSeries>[
      RadialBarSeries<ChartData, String>(
          legendIconType: LegendIconType.seriesType,
          dataSource: _chartData,
          xValueMapper: (ChartData data, _) => data.name,
          yValueMapper: (ChartData data, _) => data.value,
          dataLabelSettings: const DataLabelSettings(
            isVisible: true,
          ),
          enableTooltip: true,
          cornerStyle: CornerStyle.endCurve,
          maximumValue: 100)
    ],
  ),

Comments

Submit
0 Comments