ColumnChart constructor
const
ColumnChart({
- Key? key,
- double width = 500,
- double height = 300,
- required List<
ChartLabeledData> datas, - ChartController<
ChartLabeledState> ? controller, - ChartAnimation? animation,
- ChartBehavior<
ChartState> ? behavior, - Color? backgroundColor,
- double barRatio = 0.5,
- double? maxValue,
- ChartMarkType markType = ChartMarkType.integer,
- ChartInteractionCallback<
ChartState> ? onTap, - ChartInteractionCallback<
ChartState> ? onDoubleTap, - ChartInteractionCallback<
ChartState> ? onLongPress, - ChartInteractionCallback<
ChartState> ? onHoverStart, - ChartInteractionCallback<
ChartState> ? onHoverEnd, - int separatedLineCount = 5,
- double separatedLineWidth = 2,
- Color? separatedLineColor,
- TextStyle? separatedTextStyle,
- double separatedTextMargin = 15,
- ChartSeparatedTextAlignment separatedTextAlignment = ChartSeparatedTextAlignment.trailing,
- ChartSeparatedTextDirection separatedTextDirection = ChartSeparatedTextDirection.leading,
- Color? separatedBorderColor,
- double? separatedBorderWidth,
- StrokeCap separatedLineCap = StrokeCap.butt,
- double labelTextMargin = 5,
- TextStyle? labelTextStyle,
- double barInnerTextMargin = 10,
- double barOuterTextMargin = 3,
- ChartTextStyleBuilder<
ChartLabeledState> ? barInnerTextStyle, - ChartTextStyleBuilder<
ChartLabeledState> ? barOuterTextStyle, - ChartBarTextAlignment barTextAlignment = ChartBarTextAlignment.outer,
- BorderRadius barBorderRadius = const BorderRadius.vertical(top: Radius.circular(5)),
- Color? barColor,
- bool isVisibleSeparatedText = true,
- bool isVisibleBarText = false,
- bool isVisibleLabel = true,
Implementation
const ColumnChart({
super.key,
super.width = 500,
super.height = 300,
required this.datas,
this.controller,
this.animation,
this.behavior,
this.backgroundColor,
this.barRatio = 0.5,
this.maxValue,
this.markType = ChartMarkType.integer,
this.onTap,
this.onDoubleTap,
this.onLongPress,
this.onHoverStart,
this.onHoverEnd,
this.separatedLineCount = 5,
this.separatedLineWidth = 2,
this.separatedLineColor,
this.separatedTextStyle,
this.separatedTextMargin = 15,
this.separatedTextAlignment = ChartSeparatedTextAlignment.trailing,
this.separatedTextDirection = ChartSeparatedTextDirection.leading,
this.separatedBorderColor,
this.separatedBorderWidth,
this.separatedLineCap = StrokeCap.butt,
this.labelTextMargin = 5,
this.labelTextStyle,
this.barInnerTextMargin = 10,
this.barOuterTextMargin = 3,
this.barInnerTextStyle,
this.barOuterTextStyle,
this.barTextAlignment = ChartBarTextAlignment.outer,
this.barBorderRadius = const BorderRadius.vertical(top: Radius.circular(5)),
this.barColor,
this.isVisibleSeparatedText = true,
this.isVisibleBarText = false,
this.isVisibleLabel = true,
}) : assert(separatedLineCount > 1);