Commit a282bf1d8fe7b909542fcb01f35219f8845c5758

Authored by 胡翰林
1 parent 7ed722d3

柱状图图例倾斜展示

... ... @@ -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
... ...