BaseChartPainter constructor

BaseChartPainter(
  1. ChartStyle chartStyle, {
  2. List<KLineEntity>? datas,
  3. required double scaleX,
  4. required double scrollX,
  5. required bool isLongPress,
  6. required double selectX,
  7. required double xFrontPadding,
  8. bool isOnTap = false,
  9. MainState mainState = MainState.MA,
  10. bool volHidden = false,
  11. bool isTapShowInfoDialog = false,
  12. SecondaryState secondaryState = SecondaryState.MACD,
  13. bool isLine = false,
})

Implementation

BaseChartPainter(
  this.chartStyle, {
  this.datas,
  required this.scaleX,
  required this.scrollX,
  required this.isLongPress,
  required this.selectX,
  required this.xFrontPadding,
  this.isOnTap = false,
  this.mainState = MainState.MA,
  this.volHidden = false,
  this.isTapShowInfoDialog = false,
  this.secondaryState = SecondaryState.MACD,
  this.isLine = false,
}) {
  mItemCount = datas?.length ?? 0;
  mPointWidth = this.chartStyle.pointWidth;
  mTopPadding = this.chartStyle.topPadding;
  mBottomPadding = this.chartStyle.bottomPadding;
  mChildPadding = this.chartStyle.childPadding;
  mGridRows = this.chartStyle.gridRows;
  mGridColumns = this.chartStyle.gridColumns;
  mDataLen = mItemCount * mPointWidth;
  initFormats();
}