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. required BaseDimension baseDimension,
  9. bool isOnTap = false,
  10. MainState mainState = MainState.MA,
  11. bool volHidden = false,
  12. bool isTapShowInfoDialog = false,
  13. Set<SecondaryState> secondaryStateLi = const <SecondaryState>{},
  14. bool isLine = false,
})

constructor BaseChartPainter

Implementation

BaseChartPainter(
  this.chartStyle, {
  this.datas,
  required this.scaleX,
  required this.scrollX,
  required this.isLongPress,
  required this.selectX,
  required this.xFrontPadding,
  required this.baseDimension,
  this.isOnTap = false,
  this.mainState = MainState.MA,
  this.volHidden = false,
  this.isTapShowInfoDialog = false,
  this.secondaryStateLi = const <SecondaryState>{},
  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();
}