mirror of
https://github.com/morrisjs/morris.js.git
synced 2024-11-10 21:36:34 +01:00
Small change to drawing code to make sure if labels overlap, it is attempted on the next loop
This commit is contained in:
parent
16db900413
commit
ff14f2a659
@ -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)
|
||||||
|
@ -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
2
morris.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user