how to display LineChart X axis coordinate lables vertically

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
mahesh_burgu
Posts: 25
Joined: Mon Oct 08, 2007 7:16 am

how to display LineChart X axis coordinate lables vertically

Post by mahesh_burgu » Mon Oct 08, 2007 10:29 am

how to display LineChart X axis coordinate lables vertically

i am new to JFreeChart.I have successfully used Line Chart in my project,in that X axis coordinate labels are displayed horizontally by default,but what i want is X axis coordinate lables are to be displayed vertically as i am showing time stamp as lables like Oct 08,02:30:50(ie with full date and time in this format)....so presently as the time stamp is being shown horizontally ,the time stamp is getting truncated .....How to change the code as per my requirement.....i have tried many exmaples but i could not any solution..........Can some one help me how to do this
thanks
mahesh

svlaxmi4u
Posts: 1
Joined: Thu Nov 22, 2007 1:33 pm

display xaxis label vertically

Post by svlaxmi4u » Thu Nov 22, 2007 1:34 pm

NumberAxis domainAxis = (NumberAxis)((XYPlot) plot).getDomainAxis();
domainAxis.setVerticalTickLabels(true);

DoubleUDee
Posts: 2
Joined: Sat Nov 24, 2007 6:36 am

Post by DoubleUDee » Sat Nov 24, 2007 8:12 am

Hi all i also wanna change the x axis located above to simulate the drilling, like this

0 1 2 3 4 5 - x
1
2
3
4
5
|
y

really appreciate any help thanks

mahesh_burgu
Posts: 25
Joined: Mon Oct 08, 2007 7:16 am

Post by mahesh_burgu » Tue Nov 27, 2007 8:11 am

try this

ValueAxis rangeAxis = ((CategoryPlot) plot).getRangeAxis();
CategoryAxis domainAxis = ((CategoryPlot) plot).getDomainAxis();
domainAxis.setCategoryLabelPositions(CategoryLabelPositions.UP_90);
thanks
mahesh

Locked