drawLine method
void
drawLine()
Implementation
void drawLine(double? lastPrice, double? curPrice, Canvas canvas,
double lastX, double curX, Color color) {
if (lastPrice == null || curPrice == null) {
return;
}
//("lasePrice==" + lastPrice.toString() + "==curPrice==" + curPrice.toString());
double lastY = getY(lastPrice);
double curY = getY(curPrice);
//print("lastX-----==" + lastX.toString() + "==lastY==" + lastY.toString() + "==curX==" + curX.toString() + "==curY==" + curY.toString());
canvas.drawLine(
Offset(lastX, lastY), Offset(curX, curY), chartPaint..color = color);
}