PieChart constructor

const PieChart({
  1. required Map<String, double> dataMap,
  2. ChartType chartType = ChartType.disc,
  3. double? chartRadius,
  4. Duration? animationDuration,
  5. double chartLegendSpacing = 48,
  6. List<Color> colorList = defaultColorList,
  7. double? initialAngleInDegree,
  8. String formatChartValues(
    1. double value
    )?,
  9. String? centerText,
  10. Widget? centerWidget,
  11. TextStyle? centerTextStyle,
  12. double ringStrokeWidth = 20.0,
  13. LegendOptions legendOptions = const LegendOptions(),
  14. ChartValuesOptions chartValuesOptions = const ChartValuesOptions(),
  15. Color emptyColor = Colors.grey,
  16. List<List<Color>>? gradientList,
  17. List<Color> emptyColorGradient = const [Colors.black26, Colors.black54],
  18. Map<String, String> legendLabels = const {},
  19. Key? key,
  20. DegreeOptions degreeOptions = const DegreeOptions(),
  21. Color baseChartColor = Colors.transparent,
  22. 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);