DonutChart constructor

const DonutChart({
  1. Key? key,
  2. required List<DataItem> dataset,
  3. DatasetOrdering? datasetOrdering,
  4. String title = '',
  5. double? height,
  6. double? width,
  7. double maxWidth = 600.0,
  8. List<Color> customColors = colors,
  9. Color? backGroundColor,
  10. bool showTitle = true,
  11. bool showCenterText = true,
  12. bool showLabels = true,
  13. bool showLegend = true,
  14. bool showLines = true,
  15. bool animate = true,
  16. Duration animationDuration = const Duration(milliseconds: 900),
  17. Curve animationCurve = Curves.easeOutCubic,
  18. bool enableHover = true,
  19. ValueChanged<DataItem?>? onSectorHover,
  20. bool enableTapHighlight = true,
  21. bool toggleTapHighlight = true,
  22. ValueChanged<DataItem?>? onSectorTap,
})

Creates a DonutChart.

Implementation

const DonutChart({
  super.key,
  required this.dataset,
  this.datasetOrdering,
  this.title = '',
  this.height,
  this.width,
  this.maxWidth = 600.0,
  this.customColors = colors,
  this.backGroundColor,
  this.showTitle = true,
  this.showCenterText = true,
  this.showLabels = true,
  this.showLegend = true,
  this.showLines = true,
  this.animate = true,
  this.animationDuration = const Duration(milliseconds: 900),
  this.animationCurve = Curves.easeOutCubic,
  this.enableHover = true,
  this.onSectorHover,
  this.enableTapHighlight = true,
  this.toggleTapHighlight = true,
  this.onSectorTap,
});