Skip to content

Commit 85283b5

Browse files
committed
add text pad around the bounding box
1 parent cf68ae7 commit 85283b5

File tree

7 files changed

+3
-3
lines changed

7 files changed

+3
-3
lines changed

src/plots/cartesian/autorange.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -297,10 +297,10 @@ function padInsideLabelsOnAnchorAxis(ax, max) {
297297
// use bounding boxes
298298
anchorAxis._vals.forEach(function(t) {
299299
if(t.bb) {
300-
var w = t.bb.width;
301-
var h = t.bb.height;
300+
var w = 2 * TEXTPAD + t.bb.width;
301+
var h = 2 * TEXTPAD + t.bb.height;
302302

303-
pad = Math.max(pad, TEXTPAD + isX ?
303+
pad = Math.max(pad, isX ?
304304
Math.max(w * cosA, h * sinA) :
305305
Math.max(h * cosA, w * sinA)
306306
);
-2.24 KB
Loading
4.29 KB
Loading
-1.83 KB
Loading
458 Bytes
Loading
620 Bytes
Loading
1.64 KB
Loading

0 commit comments

Comments
 (0)