drawChart method
void
drawChart(
- MACDEntity lastPoint,
- MACDEntity curPoint,
- double lastX,
- double curX,
- Size size,
- Canvas canvas,
override
Implementation
@override
void drawChart(MACDEntity lastPoint, MACDEntity curPoint, double lastX,
double curX, Size size, Canvas canvas) {
switch (state) {
case SecondaryState.MACD:
drawMACD(curPoint, canvas, curX, lastPoint, lastX);
break;
case SecondaryState.KDJ:
drawLine(lastPoint.k, curPoint.k, canvas, lastX, curX,
this.chartColors.kColor);
drawLine(lastPoint.d, curPoint.d, canvas, lastX, curX,
this.chartColors.dColor);
drawLine(lastPoint.j, curPoint.j, canvas, lastX, curX,
this.chartColors.jColor);
break;
case SecondaryState.RSI:
drawLine(lastPoint.rsi, curPoint.rsi, canvas, lastX, curX,
this.chartColors.rsiColor);
break;
case SecondaryState.WR:
drawLine(lastPoint.r, curPoint.r, canvas, lastX, curX,
this.chartColors.rsiColor);
break;
case SecondaryState.CCI:
drawLine(lastPoint.cci, curPoint.cci, canvas, lastX, curX,
this.chartColors.rsiColor);
break;
default:
break;
}
}