PieChart constructor
const
PieChart({
- required Map<
String, double> dataMap, - ChartType chartType = ChartType.disc,
- double? chartRadius,
- Duration? animationDuration,
- double chartLegendSpacing = 48,
- List<
Color> colorList = defaultColorList, - double? initialAngleInDegree,
- String formatChartValues(
- double value
- String? centerText,
- Widget? centerWidget,
- TextStyle? centerTextStyle,
- double ringStrokeWidth = 20.0,
- LegendOptions legendOptions = const LegendOptions(),
- ChartValuesOptions chartValuesOptions = const ChartValuesOptions(),
- Color emptyColor = Colors.grey,
- List<
List< ? gradientList,Color> > - List<
Color> emptyColorGradient = const [Colors.black26, Colors.black54], - Map<
String, String> legendLabels = const {}, - Key? key,
- DegreeOptions degreeOptions = const DegreeOptions(),
- Color baseChartColor = Colors.transparent,
- double? totalValue,
Implementation
const PieChart({
required this.dataMap,
this.chartType = ChartType.disc,
this.chartRadius,
this.animationDuration,
this.chartLegendSpacing = 48,
this.colorList = defaultColorList,
this.initialAngleInDegree,
this.formatChartValues,
this.centerText,
this.centerWidget,
this.centerTextStyle,
this.ringStrokeWidth = 20.0,
this.legendOptions = const LegendOptions(),
this.chartValuesOptions = const ChartValuesOptions(),
this.emptyColor = Colors.grey,
this.gradientList,
this.emptyColorGradient = const [Colors.black26, Colors.black54],
this.legendLabels = const {},
Key? key,
this.degreeOptions = const DegreeOptions(),
this.baseChartColor = Colors.transparent,
this.totalValue,
}) : super(key: key);