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
You can use setVerticalTickLabels(true) on your domain axis, as shown in this example.
Addendum: Oops, the example cited is for a ValueAxis. For a CategoryAxis, as used in StackedBarChart, you have even more flexility with the method setCategoryLabelPositions(). Typical usage is illustrated in the BarChartDemo1 source, shown here.