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 @@ -150,7 +150,11 @@ public float computeRawX(float valueX) {
public float computeRawY(float valueY) {
final float pixelOffset = (valueY - currentViewport.bottom) * (contentRectMinusAllMargins.height() /
currentViewport.height());
return contentRectMinusAllMargins.bottom - pixelOffset;
if(Float.isNaN(pixelOffset)){ // if currentViewport.height() == 0 for example the line inLineChart is not visiable.
return contentRectMinusAllMargins.bottom
}else{
return contentRectMinusAllMargins.bottom - pixelOffset;
}
}

/**
Expand Down Expand Up @@ -346,4 +350,4 @@ private void computeMinimumWidthAndHeight() {
minViewportHeight = this.maxViewport.height() / maxZoom;
}

}
}