BarChart<T> constructor

const BarChart<T>({
  1. Key? key,
  2. Widget? child,
  3. Color upperColor = Colors.red,
  4. Color fairColor = Colors.black45,
  5. Color lowerColor = Colors.green,
  6. double strokeWidth = 1,
  7. PaintingStyle upperStyle = PaintingStyle.fill,
  8. PaintingStyle fairStyle = PaintingStyle.fill,
  9. PaintingStyle lowerStyle = PaintingStyle.fill,
  10. Color crossLineColor = Colors.red,
  11. double crossLineWidth = 0.5,
  12. TextStyle textStyle = const TextStyle(color: Colors.black, fontSize: 8),
  13. bool showText = true,
  14. double paddingTop = 0,
  15. Color gridLineColor = Colors.black12,
  16. double gridLineWidth = 0.5,
  17. int gridHorizontalGrids = 3,
  18. int gridVerticalGrids = 3,
  19. required List<double> transform(
    1. List<T> values
    ),
  20. required BarStyle transformBarStyle(
    1. T item
    ),
})

Implementation

const BarChart({
  super.key,
  super.child,
  this.upperColor = Colors.red,
  this.fairColor = Colors.black45,
  this.lowerColor = Colors.green,
  this.strokeWidth = 1,
  this.upperStyle = PaintingStyle.fill,
  this.fairStyle = PaintingStyle.fill,
  this.lowerStyle = PaintingStyle.fill,
  this.crossLineColor = Colors.red,
  this.crossLineWidth = 0.5,
  this.textStyle = const TextStyle(color: Colors.black, fontSize: 8),
  this.showText = true,
  this.paddingTop = 0,
  this.gridLineColor = Colors.black12,
  this.gridLineWidth = 0.5,
  this.gridHorizontalGrids = 3,
  this.gridVerticalGrids = 3,
  required this.transform,
  required this.transformBarStyle,
});