KChart constructor
const
KChart({
- Key? key,
- Widget? child,
- double paddingTop = 0,
- double strokeWidth = 1,
- Color gridLineColor = Colors.black12,
- double gridLineWidth = 0.5,
- int gridHorizontalGrids = 3,
- int gridVerticalGrids = 3,
- TextStyle gridTextStyle = const TextStyle(color: Colors.black45, fontSize: 8),
- TextStyle gridUpperStyle = const TextStyle(color: Colors.black45, fontSize: 8),
- TextStyle gridlowerStyle = const TextStyle(color: Colors.black45, fontSize: 8),
- Color averageLineColor = Colors.red,
- Color upperColor = Colors.red,
- Color lowerColor = Colors.green,
- PaintingStyle upperStyle = PaintingStyle.stroke,
- PaintingStyle lowerStyle = PaintingStyle.fill,
- TextStyle horizontalTextStyle = const TextStyle(color: Colors.black45, fontSize: 8),
- List<
Color> maDayColors = const [Colors.yellow, Colors.blue, Colors.deepOrange, Colors.indigo], - double maStrokeWidth = 0.5,
- TextStyle crossLowerTextStyle = const TextStyle(fontSize: 8),
- TextStyle crossUpperTextStyle = const TextStyle(fontSize: 8),
- Color crossTextBgColor = Colors.green,
- Color crossTextBorderColor = Colors.black,
- Color crossLineColor = Colors.red,
- double crossLineWidth = 0.5,
- void onCrossChange(
- int index,
- MainAxisAlignment alignment
- Color highMarkColor = Colors.black,
- Color lowMarkColor = Colors.black,
- double markSize = 7,
- bool showCrossText = true,
- required String transformTime(
- 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,
});