I\'m generating a StackedBarChart using JFreeChart. Depending on the input data I can have a lot of categories (usually between 20 and 40), leading to overlapping of the lab
One simple solution is to set the Category lables to the backround colour (in this case white).
CategoryPlot plot = (CategoryPlot) chart.getPlot();
CategoryAxis domainAxis = plot.getDomainAxis();
domainAxis.setTickLabelPaint("Category 2", Color.white);
domainAxis.setTickLabelPaint("Category 4", Color.white);
This will produce a chart like this
