JFreeChart StackedBarChart

∥☆過路亽.° 提交于 2019-12-11 04:47:00

问题


I am drawing a stackedbarchart. Now for the x-axis i have labels which are auto generated based on CategoryDataset. I want to show these labels with intervals because otherwise they are overlapped in case i have large number of values for the dataset.

But I am not able to understand how to achieve this. For example i have this following code.

CategoryDataset dataset = getDataset();
final JFreeChart chart = ChartFactory.createStackedBarChart(
                graphTitle, xAxisTitle, yAxisTitle,
                dataset, orientation, legend, toolTips, urls);
CategoryPlot plot = chart.getCategoryPlot();

Now how can i add x-axis labels in intervals that is I don't want a label for each column rather after each 5 columns.

来源:https://stackoverflow.com/questions/48833471/jfreechart-stackedbarchart

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