Skip to content

Commit

Permalink
Avoid that the last label entry in the x-labels clip off the edge of …
Browse files Browse the repository at this point in the history
…the screen PhilJay#3819
  • Loading branch information
zhanglong authored and zhanglong committed Feb 27, 2018
1 parent 984e05f commit 7ac8e8d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ protected void drawLabels(Canvas c, float pos, MPPointF anchor) {
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
Expand Down

0 comments on commit 7ac8e8d

Please sign in to comment.