Merge pull request #3820 from longup/master

Fix last entry clipping bug #3819
This commit is contained in:
Mick A 2018-05-01 21:19:05 -06:00 committed by GitHub
commit 640208c8ff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -207,7 +207,7 @@ public class XAxisRenderer extends AxisRenderer {
if (mXAxis.isAvoidFirstLastClippingEnabled()) {
// avoid clipping of the last
if (i == mXAxis.mEntryCount - 1 && mXAxis.mEntryCount > 1) {
if (i / 2 == mXAxis.mEntryCount - 1 && mXAxis.mEntryCount > 1) {
float width = Utils.calcTextWidth(mAxisLabelPaint, label);
if (width > mViewPortHandler.offsetRight() * 2