How to make the x-axis values vartical

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Haviv Rosh

How to make the x-axis values vartical

Post by Haviv Rosh » Mon Jan 06, 2003 1:24 pm

Hi
I would like to know how can I make the x-axis values
(on XY or bar chart) to be written vertically rather then horizontally ?
for example

^
|
|
|
|
|
--------------------------------------->
S M T
u o u
n n s
d d e
a a d
y y a
y

Thanks

David Gilbert

Re: How to make the x-axis values vartical

Post by David Gilbert » Tue Jan 07, 2003 11:56 am

Yes you can. Most of the Horizontal***Axis classes have a method setVerticalTickLabels(boolean) that will do this. For example:

XYPlot plot = myChart.getXYPlot();
HorizontalDateAxis axis = (HorizontalDateAxis) plot.getDomainAxis();
axis.setVerticalTickLabels(true);

Regards,

Dave Gilbert

xia

How to make the x-axis values slanting

Post by xia » Wed Jan 15, 2003 11:04 am

Hi
I would like to know how can I make the x-axis values
(on XY or bar chart) to be written vertically rather then slanting?
for example
^
|
|
|
|
|
--------------------------------------->
S M T
u o u
n n s
d d e
a a d
y y a
y

David Gilbert

Re: How to make the x-axis values vartical

Post by David Gilbert » Wed Jan 15, 2003 11:09 am

That would require customising the draw(...) method in the corresponding axis class.

Regards,

Dave Gilbert

Locked