drawInterpretationAreas method
- Canvas canvas,
- List<
MarkerIndices> ? list, - Paint? zoneStyle
Draws interpretation areas on the graph
canvas
is the canvas to draw on.
list
is the list of marker indices.
zoneStyle
is the paint style for the zone.
Implementation
void drawInterpretationAreas(
Canvas canvas, List<MarkerIndices>? list, Paint? zoneStyle) {
if (list == null || list.isEmpty) {
return;
}
double startX, stopX = 0;
for (int i = 0; i < list.length; i++) {
startX = getScreenX(list[i].getFrom());
stopX = getScreenX(list[i].getTo());
//Marker
Rect zoneRect =
Rect.fromLTRB(startX, paddingTop, stopX, yTocoOrigin); //50
canvas.drawRect(zoneRect, zoneStyle!);
}
}