Vertical tick Labels for bar chart

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
tfawcett
Posts: 2
Joined: Mon Jul 17, 2006 8:40 pm

Vertical tick Labels for bar chart

Post by tfawcett » Mon Jul 17, 2006 9:56 pm

Hi everybody,

I want to make the tick labels of my bar chart vertical, but can't seem to do it. I have tried many examples found on the web. Does any one know how to do this?

Thanks

cenicienta
Posts: 15
Joined: Mon Jun 26, 2006 8:31 pm
Location: Paris

Post by cenicienta » Mon Jul 17, 2006 10:23 pm

Hi,

Try with this code :

Code: Select all

 
       CategoryPlot categoryPlot = jfreechart.getCategoryPlot();
       CategoryAxis categoryAaxis = categoryPlot.getDomainAxis();
       categoryAxis.setCategoryLabelPositions(CategoryLabelPositions.UP_90);

tfawcett
Posts: 2
Joined: Mon Jul 17, 2006 8:40 pm

Post by tfawcett » Tue Jul 18, 2006 2:59 pm

Thanks very much. It worked perfectly

Locked