ProgressBarChart constructor
ProgressBarChart({
- Key? key,
- double minWidth = 0,
- EdgeInsetsGeometry padding = const EdgeInsets.all(20),
- BarChartStyle barChartStyle = BarChartStyle.vertical,
- required ChartAxis xAxis,
- required ChartAxis yAxis,
- required List<
ProgressBarBundle> barBundleList, - double barGroupSpace = 30,
- double singleBarWidth = 30,
- double barMaxValue = 0,
- Color selectedHintTextColor = Colors.white,
- Color selectedHintTextBackgroundColor = Colors.black,
- OnBarItemClickInterceptor? onBarItemClickInterceptor,
- BrnProgressBarChartSelectCallback? barChartSelectCallback,
- double height = 300,
create BrnProgressBarChart
Implementation
ProgressBarChart(
{Key? key,
this.minWidth = 0,
this.padding = const EdgeInsets.all(20),
this.barChartStyle = BarChartStyle.vertical,
required this.xAxis,
required this.yAxis,
required this.barBundleList,
this.barGroupSpace = 30,
this.singleBarWidth = 30,
this.barMaxValue = 0,
this.selectedHintTextColor = Colors.white,
this.selectedHintTextBackgroundColor = Colors.black,
this.onBarItemClickInterceptor,
this.barChartSelectCallback,
this.height = 300})
: super(key: key) {
if (BarChartStyle.horizontal == barChartStyle) {
assert(barBundleList[0].barList.length == yAxis.axisItemList.length,
'水平柱状图个数与Y轴坐标数目要相等');
} else if (BarChartStyle.vertical == barChartStyle) {
assert(barBundleList[0].barList.length == xAxis.axisItemList.length,
'竖直柱状图个数与X轴坐标数目要相等');
}
}