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. MainState mainState = MainState.MA,
  8. bool volHidden = false,
  9. SecondaryState secondaryState = SecondaryState.MACD,
  10. 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();
}