BarChart constructor

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

Creates a BarChart.

Implementation

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