Display column keys of stacked bar chart vertically in jFreeCharts

雨燕双飞 提交于 2019-12-02 06:58:27

问题


I am developing a javaEE application using jfreecharts. I successfully displayed my data using a stackedBarChart but the column keys (Y-axis labels) are not fully displayed because they are too large. how can I display them vertically? thanks for your suggestions


回答1:


You can use setCategoryLabelPositions() like they show here.

CategoryPlot plot = (CategoryPlot) chart.getPlot();
CategoryAxis domainAxis = plot.getDomainAxis();
domainAxis.setCategoryLabelPositions(CategoryLabelPositions.UP_90));


来源:https://stackoverflow.com/questions/16317373/display-column-keys-of-stacked-bar-chart-vertically-in-jfreecharts

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!