init method

void init()

Implementation

void init() {
  if (mBuyData == null ||
      mBuyData!.isEmpty ||
      mSellData == null ||
      mSellData!.isEmpty) return;
  mMaxVolume = mBuyData![0].vol;
  mMaxVolume = max(mMaxVolume!, mSellData!.last.vol);
  mMaxVolume = mMaxVolume! * 1.05;
  mMultiple = mMaxVolume! / mLineCount;
  fixedLength ??= 2;

  selectPaint = Paint()
    ..isAntiAlias = true
    ..color = chartColors.selectFillColor;
  selectBorderPaint = Paint()
    ..isAntiAlias = true
    ..color = chartColors.selectBorderColor
    ..style = PaintingStyle.stroke
    ..strokeWidth = 0.5;
}