I am using this plugin for creating a pie chart. The label are shown perfectly when there are only 2 divisions but when they increase only 2 labels are shown rest are not. My Code:-
final List<ChartData> chartData=[ChartData('abc;, 15),ChartData('uvw', 15),ChartData('xyz', 15)];
class ChartData {
ChartData(this.x, this.y, [this.color]);
final String x;
final double y;
final Color color;
}
SfCircularChart(
series: <CircularSeries>[
DoughnutSeries<ChartData, String>(
dataSource: chartData,
pointColorMapper:(ChartData data, _) => data.color,
xValueMapper: (ChartData data, _) => data.x,
yValueMapper: (ChartData data, _) => data.y,
startAngle: 90,
endAngle: 360,
dataLabelMapper: (ChartData data, _) => data.x,
radius: '45%',
dataLabelSettings: DataLabelSettings(
isVisible: true,
labelPosition: ChartDataLabelPosition.outside,
labelAlignment: ChartDataLabelAlignment.auto,
textStyle: GoogleFonts.gugi(
textStyle: TextStyle(
),
),
),
)
]
),