initChartRenderer method

  1. @override
void initChartRenderer()
override

Implementation

@override
void initChartRenderer() {
  if (datas != null && datas!.isNotEmpty) {
    var t = datas![0];
    fixedLength =
        NumberUtil.getMaxDecimalLength(t.open, t.close, t.high, t.low);
  }
  mMainRenderer = MainRenderer(
    mMainRect,
    mMainMaxValue,
    mMainMinValue,
    mTopPadding,
    mainState,
    isLine,
    fixedLength,
    this.chartStyle,
    this.chartColors,
    this.scaleX,
    verticalTextAlignment,
    maDayList,
  );
  if (mVolRect != null) {
    mVolRenderer = VolRenderer(mVolRect!, mVolMaxValue, mVolMinValue,
        mChildPadding, fixedLength, this.chartStyle, this.chartColors);
  }
  if (mSecondaryRect != null) {
    mSecondaryRenderer = SecondaryRenderer(
        mSecondaryRect!,
        mSecondaryMaxValue,
        mSecondaryMinValue,
        mChildPadding,
        secondaryState,
        fixedLength,
        chartStyle,
        chartColors);
  }
}