Skip to content

Commit 3eda9e8

Browse files
committed
cosmetics with axis labels rotation
1 parent 1eb1c4b commit 3eda9e8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

scripts/JSRootPainter.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3651,13 +3651,13 @@
36513651
// rotate X lables if they are too big
36523652
if ((textscale < 0.7) && !vertical && (side>0)) {
36533653
label_g.selectAll("text").each(function() {
3654-
var txt = d3.select(this), x = txt.attr("x"), y = txt.attr("y");
3654+
var txt = d3.select(this), x = txt.attr("x"), y = txt.attr("y") - 5;
36553655

3656-
txt.attr("transform", "translate(" + x+ ","+y + ") rotate(20)")
3656+
txt.attr("transform", "translate(" + x + "," + y + ") rotate(25)")
36573657
.style("text-anchor", "start")
36583658
.attr("x",null).attr("y",null);
36593659
});
3660-
textscale*=2;
3660+
textscale *= 3.5;
36613661
}
36623662
// round to upper boundary for calculated value like 4.4
36633663
labelfont.size = Math.floor(labelfont.size * textscale + 0.7);

0 commit comments

Comments
 (0)