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