提交 44d170b2 编写于 作者: D Daniel Beck 提交者: Oliver Gondža

[FIXED JENKINS-22686] Add a few pixels distance between tick labels.

上级 82e52456
......@@ -46,6 +46,12 @@ import java.util.*;
* @author Kohsuke Kawaguchi
*/
public class NoOverlapCategoryAxis extends CategoryAxis {
/**
* Minimum distance between labels.
*/
private static final double MIN_DISTANCE = 6.0;
public NoOverlapCategoryAxis(String label) {
super(label);
}
......@@ -140,6 +146,11 @@ public class NoOverlapCategoryAxis extends CategoryAxis {
}
}
r = bounds.getBounds2D();
// add margins in all directions
r.add(r.getMaxX() + MIN_DISTANCE, r.getCenterY());
r.add(r.getMinX() - MIN_DISTANCE, r.getCenterY());
r.add(r.getCenterX(), r.getMinY() - MIN_DISTANCE);
r.add(r.getCenterX(), r.getMaxX() + MIN_DISTANCE);
}
categoryIndex++;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册