transformValues method
Transforms the x and y values to screen coordinates.
Implementation
@override
void transformValues() {
points.clear();
_drawIndexes.clear();
_highPoints.clear();
_lowPoints.clear();
_startControlHighPoints.clear();
_endControlHighPoints.clear();
_fillPath.reset();
_strokePath.reset();
if (_xValues.isEmpty || _yValues.isEmpty) {
return;
}
_calculatePoints(_xValues, _yValues);
final List<Offset> lerpHighPoints =
_lerpPoints(_oldHighPoints, _highPoints);
final List<Offset> lerpLowPoints = _lerpPoints(_oldLowPoints, _lowPoints);
final List<Offset> lerpStartControlHighPoints =
_lerpPoints(_oldStartControlHighPoints, _startControlHighPoints);
final List<Offset> lerpEndControlHighPoints =
_lerpPoints(_oldEndControlHighPoints, _endControlHighPoints);
_createFillPath(_fillPath, lerpHighPoints, lerpLowPoints,
lerpStartControlHighPoints, lerpEndControlHighPoints);
switch (series.borderDrawMode) {
case BorderDrawMode.all:
_strokePath = _fillPath;
break;
case BorderDrawMode.top:
_createTopStrokePath(
_strokePath,
lerpHighPoints,
lerpStartControlHighPoints,
lerpEndControlHighPoints,
);
break;
case BorderDrawMode.excludeBottom:
_createExcludeBottomStrokePath(
_strokePath,
lerpHighPoints,
lerpLowPoints,
lerpStartControlHighPoints,
lerpEndControlHighPoints,
);
break;
}
}