Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -488,13 +488,14 @@ public void draw(GraphView graphView, Canvas canvas, boolean isSecondScale) {
}

if (mStyles.drawBackground && firstX != -1) {
float zero = (float) (graphHeight + graphTop + minY / diffY * graphHeight);
// end / close path
if (lastUsedEndY != graphHeight + graphTop) {
if (lastUsedEndY != zero) {
// dont draw line to same point, otherwise the path is completely broken
mPathBackground.lineTo((float) lastUsedEndX, graphHeight + graphTop);
mPathBackground.lineTo((float) lastUsedEndX, zero);
}
mPathBackground.lineTo(firstX, graphHeight + graphTop);
if (firstY != graphHeight + graphTop) {
mPathBackground.lineTo(firstX, zero);
if (firstY != zero) {
// dont draw line to same point, otherwise the path is completely broken
mPathBackground.lineTo(firstX, firstY);
}
Expand Down