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