Bar charts : customizing axis

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
SimOOn
Posts: 10
Joined: Wed Aug 27, 2008 9:44 am
Contact:

Bar charts : customizing axis

Post by SimOOn » Wed Aug 27, 2008 9:59 am

Hi,

I am customizing bar charts and I meet some problems with customizing the axis :
- for a horizontal bar chart, I would like to place the value axis at the bottom of the chart and not at its top,

- for a bar chart, I am looking for solutions in order to place the label of the value axis at the top of the axis, not at its left,

- and finally for a bar chart, I would like to add a line at the extreme right of the chart.

I succeeded to solve all the other problems but theses last ones cause difficulties.

Thanks.

SimOOn
Posts: 10
Joined: Wed Aug 27, 2008 9:44 am
Contact:

Post by SimOOn » Wed Aug 27, 2008 2:12 pm

I figured out the answer fro my first question :

To put the range axis at the bottom of the graph, you have to add these lines :

Code: Select all

CategoryPlot categoryPlot=chart.getCategoryPlot();
categoryPlot.setRangeAxisLocation(AxisLocation.BOTTOM_OR_RIGHT);

SimOOn
Posts: 10
Joined: Wed Aug 27, 2008 9:44 am
Contact:

Post by SimOOn » Wed Aug 27, 2008 4:37 pm

I haven't found a way to move the label of the range axis from the left of the chart to its top. Can somebody confirm me that it has not been implemented in JFreeChart ?

Thanks.

Locked