Distributing axes evenly...

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
aselaneli
Posts: 6
Joined: Wed Dec 21, 2011 11:09 am
antibot: No, of course not.
Location: Colombo

Distributing axes evenly...

Post by aselaneli » Tue Feb 14, 2012 11:33 am

Hi all,

I have a question regarding distributing axes evenly to both sides of the trend.

Lets say that I have 4 Y axes & the default behavior is that the primary Y axis is located in
the left-hand side of the chart & the other 3 are located in the right-hand side of the chart.

Is there a way to specify the orientation of a given axis..??
Something like

Code: Select all

myAxisObject.setOrientation(Axis.ORIENTATION_LEFT);
Any help is greatly appreciated.

Thanks in advance.
Cheers,
Asela.

paradoxoff
Posts: 1634
Joined: Sat Feb 17, 2007 1:51 pm

Re: Distributing axes evenly...

Post by paradoxoff » Wed Feb 15, 2012 2:03 pm

Have look at XYPlot.setRangeAxisLocation(int index, AxisLocation location).
The int is the index of the range axis, the location is used in the static method Plot.resolveRangeAxisLocation to convert a location and the PlotOrientation to an instance of RectangleEdge, i.e. a position on any of the four edges of the plot area.

Locked