Showing
1 changed file
with
2 additions
and
0 deletions
... | ... | @@ -6,6 +6,7 @@ import lombok.extern.slf4j.Slf4j; |
6 | 6 | import org.jfree.chart.*; |
7 | 7 | import org.jfree.chart.axis.AxisLocation; |
8 | 8 | import org.jfree.chart.axis.CategoryAxis; |
9 | +import org.jfree.chart.axis.CategoryLabelPositions; | |
9 | 10 | import org.jfree.chart.axis.NumberAxis; |
10 | 11 | import org.jfree.chart.labels.StandardCategoryItemLabelGenerator; |
11 | 12 | import org.jfree.chart.labels.StandardPieSectionLabelGenerator; |
... | ... | @@ -115,6 +116,7 @@ public class JFChartUtils { |
115 | 116 | //项目轴设置 |
116 | 117 | CategoryAxis domainAxis = categoryplot.getDomainAxis(); |
117 | 118 | domainAxis.setTickLabelFont(new Font("宋体", Font.BOLD, 20)); |
119 | + domainAxis.setCategoryLabelPositions(CategoryLabelPositions.UP_45); | |
118 | 120 | |
119 | 121 | } |
120 | 122 | ... | ... |