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 3e1eb14 commit aee6058
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 aee6058

Please sign in to comment.