BaseChartPainter constructor
BaseChartPainter(
- ChartStyle chartStyle, {
- List<
KLineEntity> ? datas, - required double scaleX,
- required double scrollX,
- required bool isLongPress,
- required double selectX,
- MainState mainState = MainState.MA,
- bool volHidden = false,
- SecondaryState secondaryState = SecondaryState.MACD,
- bool isLine = false,
Implementation
BaseChartPainter(
this.chartStyle, {
this.datas,
required this.scaleX,
required this.scrollX,
required this.isLongPress,
required this.selectX,
this.mainState = MainState.MA,
this.volHidden = false,
this.secondaryState = SecondaryState.MACD,
this.isLine = false,
}) {
mItemCount = datas?.length ?? 0;
mPointWidth = this.chartStyle.pointWidth;
mDataLen = mItemCount * mPointWidth;
initFormats();
}