Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR DART

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)
    ],
  ),
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #change #legend #colour #SfCircularChart #flutter
ADD COMMENT
Topic
Name
8+4 =