Small change to drawing code to make sure if labels overlap, it is attempted on the next loop

This commit is contained in:
Mark Abbott 2012-03-13 23:46:35 +00:00
parent 16db900413
commit ff14f2a659
3 changed files with 3 additions and 1 deletions

View File

@ -164,6 +164,7 @@ class Morris.Line
prevLabelMargin = labelBox.x + labelBox.width + xLabelMargin prevLabelMargin = labelBox.x + labelBox.width + xLabelMargin
else else
label.remove() label.remove()
nextPoint = i + 1
# draw the actual series # draw the actual series
columns = (transX(x) for x in @xvals) columns = (transX(x) for x in @xvals)

View File

@ -148,6 +148,7 @@
prevLabelMargin = labelBox.x + labelBox.width + xLabelMargin; prevLabelMargin = labelBox.x + labelBox.width + xLabelMargin;
} else { } else {
label.remove(); label.remove();
nextPoint = i + 1;
} }
} }
} }

2
morris.min.js vendored

File diff suppressed because one or more lines are too long