drawChart method

  1. @override
void drawChart(
  1. CandleEntity lastPoint,
  2. CandleEntity curPoint,
  3. double lastX,
  4. double curX,
  5. Size size,
  6. Canvas canvas,
)
override

Implementation

@override
void drawChart(CandleEntity lastPoint, CandleEntity curPoint, double lastX,
    double curX, Size size, Canvas canvas) {
  if (isLine) {
    drawPolyline(lastPoint.close, curPoint.close, canvas, lastX, curX);
  } else {
    drawCandle(curPoint, canvas, curX);
    if (state == MainState.MA) {
      drawMaLine(lastPoint, curPoint, canvas, lastX, curX);
    } else if (state == MainState.BOLL) {
      drawBollLine(lastPoint, curPoint, canvas, lastX, curX);
    }
  }
}