KChart constructor

const KChart({
  1. Key? key,
  2. Widget? child,
  3. double paddingTop = 0,
  4. double strokeWidth = 1,
  5. Color gridLineColor = Colors.black12,
  6. double gridLineWidth = 0.5,
  7. int gridHorizontalGrids = 3,
  8. int gridVerticalGrids = 3,
  9. TextStyle gridTextStyle = const TextStyle(color: Colors.black45, fontSize: 8),
  10. TextStyle gridUpperStyle = const TextStyle(color: Colors.black45, fontSize: 8),
  11. TextStyle gridlowerStyle = const TextStyle(color: Colors.black45, fontSize: 8),
  12. Color averageLineColor = Colors.red,
  13. Color upperColor = Colors.red,
  14. Color lowerColor = Colors.green,
  15. PaintingStyle upperStyle = PaintingStyle.stroke,
  16. PaintingStyle lowerStyle = PaintingStyle.fill,
  17. TextStyle horizontalTextStyle = const TextStyle(color: Colors.black45, fontSize: 8),
  18. List<Color> maDayColors = const [Colors.yellow, Colors.blue, Colors.deepOrange, Colors.indigo],
  19. double maStrokeWidth = 0.5,
  20. TextStyle crossLowerTextStyle = const TextStyle(fontSize: 8),
  21. TextStyle crossUpperTextStyle = const TextStyle(fontSize: 8),
  22. Color crossTextBgColor = Colors.green,
  23. Color crossTextBorderColor = Colors.black,
  24. Color crossLineColor = Colors.red,
  25. double crossLineWidth = 0.5,
  26. void onCrossChange(
    1. int index,
    2. MainAxisAlignment alignment
    )?,
  27. Color highMarkColor = Colors.black,
  28. Color lowMarkColor = Colors.black,
  29. double markSize = 7,
  30. bool showCrossText = true,
  31. required String transformTime(
    1. int time
    ),
})

Implementation

const KChart({
  super.key,
  super.child,
  this.paddingTop = 0,
  this.strokeWidth = 1,
  this.gridLineColor = Colors.black12,
  this.gridLineWidth = 0.5,
  this.gridHorizontalGrids = 3,
  this.gridVerticalGrids = 3,
  this.gridTextStyle = const TextStyle(color: Colors.black45, fontSize: 8),
  this.gridUpperStyle = const TextStyle(color: Colors.black45, fontSize: 8),
  this.gridlowerStyle = const TextStyle(color: Colors.black45, fontSize: 8),
  this.averageLineColor = Colors.red,
  this.upperColor = Colors.red,
  this.lowerColor = Colors.green,
  this.upperStyle = PaintingStyle.stroke,
  this.lowerStyle = PaintingStyle.fill,
  this.horizontalTextStyle =
      const TextStyle(color: Colors.black45, fontSize: 8),
  this.maDayColors = const [
    Colors.yellow,
    Colors.blue,
    Colors.deepOrange,
    Colors.indigo
  ],
  this.maStrokeWidth = 0.5,
  this.crossLowerTextStyle = const TextStyle(fontSize: 8),
  this.crossUpperTextStyle = const TextStyle(fontSize: 8),
  this.crossTextBgColor = Colors.green,
  this.crossTextBorderColor = Colors.black,
  this.crossLineColor = Colors.red,
  this.crossLineWidth = 0.5,
  this.onCrossChange,
  this.highMarkColor = Colors.black,
  this.lowMarkColor = Colors.black,
  this.markSize = 7,
  this.showCrossText = true,
  required this.transformTime,
});