How do I rotate tick mark labels on the domain of a number axis in JFreeChart?

The first answer given is for a numeric domain axis. If you have a category axis, you want this code:

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

Leave a Comment