ColumnChart constructor

const ColumnChart({
  1. Key? key,
  2. double width = 500,
  3. double height = 300,
  4. required List<ChartLabeledData> datas,
  5. ChartController<ChartLabeledState>? controller,
  6. ChartAnimation? animation,
  7. ChartBehavior<ChartState>? behavior,
  8. Color? backgroundColor,
  9. double barRatio = 0.5,
  10. double? maxValue,
  11. ChartMarkType markType = ChartMarkType.integer,
  12. ChartInteractionCallback<ChartState>? onTap,
  13. ChartInteractionCallback<ChartState>? onDoubleTap,
  14. ChartInteractionCallback<ChartState>? onLongPress,
  15. ChartInteractionCallback<ChartState>? onHoverStart,
  16. ChartInteractionCallback<ChartState>? onHoverEnd,
  17. int separatedLineCount = 5,
  18. double separatedLineWidth = 2,
  19. Color? separatedLineColor,
  20. TextStyle? separatedTextStyle,
  21. double separatedTextMargin = 15,
  22. ChartSeparatedTextAlignment separatedTextAlignment = ChartSeparatedTextAlignment.trailing,
  23. ChartSeparatedTextDirection separatedTextDirection = ChartSeparatedTextDirection.leading,
  24. Color? separatedBorderColor,
  25. double? separatedBorderWidth,
  26. StrokeCap separatedLineCap = StrokeCap.butt,
  27. double labelTextMargin = 5,
  28. TextStyle? labelTextStyle,
  29. double barInnerTextMargin = 10,
  30. double barOuterTextMargin = 3,
  31. ChartTextStyleBuilder<ChartLabeledState>? barInnerTextStyle,
  32. ChartTextStyleBuilder<ChartLabeledState>? barOuterTextStyle,
  33. ChartBarTextAlignment barTextAlignment = ChartBarTextAlignment.outer,
  34. BorderRadius barBorderRadius = const BorderRadius.vertical(top: Radius.circular(5)),
  35. Color? barColor,
  36. bool isVisibleSeparatedText = true,
  37. bool isVisibleBarText = false,
  38. 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);