DonutChart constructor
const
DonutChart({
- Key? key,
- required List<
DataItem> dataset, - DatasetOrdering? datasetOrdering,
- String title = '',
- double? height,
- double? width,
- double maxWidth = 600.0,
- List<
Color> customColors = colors, - Color? backGroundColor,
- bool showTitle = true,
- bool showCenterText = true,
- bool showLabels = true,
- bool showLegend = true,
- bool showLines = true,
- bool animate = true,
- Duration animationDuration = const Duration(milliseconds: 900),
- Curve animationCurve = Curves.easeOutCubic,
- bool enableHover = true,
- ValueChanged<
DataItem?> ? onSectorHover, - bool enableTapHighlight = true,
- bool toggleTapHighlight = true,
- 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,
});