作业帮 > 综合 > 作业

jfreechart 柱图x坐标轴标签太密集,标签重叠了.

来源:学生作业帮 编辑:搜狗做题网作业帮 分类:综合作业 时间:2024/06/25 05:29:14
jfreechart 柱图x坐标轴标签太密集,标签重叠了.
JFreeChart chart = ChartFactory.createStackedBarChart3D("","","",dataset_bar,PlotOrientation.VERTICAL,true,true,false); CategoryPlot plot = (CategoryPlot) chart.getPlot(); plot.setBackgroundPaint(Color.white);  CategoryAxis categoryaxis = plot.getDomainAxis(); categoryaxis.setCategoryLabelPositions(CategoryLabelPositions.UP_45); categoryaxis.setMaximumCategoryLabelWidthRatio(5.0f); categoryaxis.setMaximumCategoryLabelLines(1);  categoryaxis.setTickLabelsVisible(false);  chart.setBackgroundImageAlpha(0.01F); categoryaxis.setTickMarksVisible(true);   categoryaxis.setCategoryLabelPositionOffset(20); return chart;
jfreechart 柱图x坐标轴标签太密集,标签重叠了.
你可以渲染一下图表啊,也可以设置横坐标的长度的