diff --git a/src/plots/cartesian/autorange.js b/src/plots/cartesian/autorange.js index ea7fdf4e94c..6b30385b911 100644 --- a/src/plots/cartesian/autorange.js +++ b/src/plots/cartesian/autorange.js @@ -244,6 +244,10 @@ function makePadFn(ax, max) { Math.max(w * cosA, h * sinA) : Math.max(h * cosA, w * sinA) ); + + var fontSize = anchorAxis.tickfont ? anchorAxis.tickfont.size : 12; + // add extra pad around label + morePad += fontSize / 5; } }); } diff --git a/test/image/baselines/ticklabelposition-1.png b/test/image/baselines/ticklabelposition-1.png index bba5ebf8937..5d65b182cb3 100644 Binary files a/test/image/baselines/ticklabelposition-1.png and b/test/image/baselines/ticklabelposition-1.png differ diff --git a/test/image/baselines/ticklabelposition-2.png b/test/image/baselines/ticklabelposition-2.png index 47f532ccfa7..7cf1efbfbc3 100644 Binary files a/test/image/baselines/ticklabelposition-2.png and b/test/image/baselines/ticklabelposition-2.png differ