我正在尝试更改syncfusion_flutter_charts包中的圆形条系列的颜色,以在加载动画期间从 0 更改为 20 而
0=>5(color = red) then
6=>10(color = yellow) then
11=>15(color = green) then
16=>20(color = blue).
有人能帮帮我吗? 带有单色动画的图表
SfCircularChart(
annotations: [
CircularChartAnnotation(
widget: const PhysicalModel(
child: SizedBox(width: 170, height: 170),
shape: BoxShape.circle,
elevation: 4,
shadowColor: Colors.black,
color: Color.fromRGBO(230, 230, 230, 1)),
),
],
legend: Legend(
overflowMode: LegendItemOverflowMode.wrap),
palette: [colorData(today)],
series: [
RadialBarSeries(
dataSource: _chartData,
xValueMapper: (GDPData data, _) =>
data.continent,
yValueMapper: (GDPData data, _) => data.gdp,
trackColor: Colors.grey.shade200,
radius: '50',
animationDuration: 2000,
animationDelay: 800,
innerRadius: '85',
maximumValue: 20)
],
),