Commit 0beb104e authored by David Schnur's avatar David Schnur

Revert #1200; it was causing #1283 breakages.

The fix for an unnecessary gap on the right of the chart turned out to
break text wrapping for ticks that were legitimately in that position.

Fixes #1283.
parent 2a3e3cd4
......@@ -1550,19 +1550,14 @@ Licensed under the MIT license.
// jump as much around with replots
$.each(allAxes(), function (_, axis) {
if (axis.reserveSpace && axis.ticks && axis.ticks.length) {
var lastTick = axis.ticks[axis.ticks.length - 1];
if (axis.direction === "x") {
margins.left = Math.max(margins.left, axis.labelWidth / 2);
if (lastTick.v <= axis.max) {
margins.right = Math.max(margins.right, axis.labelWidth / 2);
}
} else {
margins.bottom = Math.max(margins.bottom, axis.labelHeight / 2);
if (lastTick.v <= axis.max) {
margins.top = Math.max(margins.top, axis.labelHeight / 2);
}
}
}
});
plotOffset.left = Math.ceil(Math.max(margins.left, plotOffset.left));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment