How to change legend colour in sfcircularchart in flutter

Code examples

1
0

how to change legend colour in SfCircularChart in flutter

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)
    ],
  ),

Similar pages

Similar pages with examples

In other languages

This page is in other languages

Русский
..................................................................................................................
Italiano
..................................................................................................................
Polski
..................................................................................................................
Română
..................................................................................................................
한국어
..................................................................................................................
हिन्दी
..................................................................................................................
Français
..................................................................................................................
Türk
..................................................................................................................
Česk
..................................................................................................................
Português
..................................................................................................................
ไทย
..................................................................................................................
中文
..................................................................................................................
Español
..................................................................................................................
Slovenský
..................................................................................................................
Балгарскі
..................................................................................................................
Íslensk
..................................................................................................................