I am using JSF chart creator to create a XY line chart. It is working fine and thanks to the creator.
But I am facing one problem. If I use the tag as it is as described in the documentation, I get the chart as shown in Chart1
But I need to display the chart as shown in Chart2 Is there any way to achieve that using the tags of chart creator OR should I be using JFree chart API.
In other words, this is the layout that I have
(Chart1)
|
-
|
-
|
-
|_|___|____|___|
0
And I want to have layout like the below: - (Chart2)
0 _|___|____|___|
|
-
|
-
|
-
|
Thanks a lot.
Set Chart X and Y axis as if it is rotated by 90 degrees??
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
You waited a whole 2 hours and 16 minutes before asking?hsp707 wrote:no reply
The method you need is (in JFreeChart):
Code: Select all
public void setRangeAxisLocation(AxisLocation location);
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader


Thanks David. I think I should get into JFreechart and try to understand it more. I know there are so many more options that I can use and leverage it to display whichever way I want. I admit that I was trying to find a shortcut by using chart creator
....... looks like time to do some effort and learn JFreechart.

Thanks David,
Now I got it showing up like the way I wanted using setRangeAxisLocation as you said.
But now I have another problem, the chart is being displayed top-left but the values for axis ranges are not the way I want. In other words, it is being displayed as
0 10 20 30
_| _|___|____|___|
30|
|
20-
|
10-
|
0 -
But I want both axis range values to display like shown below: -
0 10 20 30
_| _|___|____|___|
0|
|
10-
|
20-
|
30 -
They should both start from 0 and increment from there.
Thanks again.
Now I got it showing up like the way I wanted using setRangeAxisLocation as you said.
But now I have another problem, the chart is being displayed top-left but the values for axis ranges are not the way I want. In other words, it is being displayed as
0 10 20 30
_| _|___|____|___|
30|
|
20-
|
10-
|
0 -
But I want both axis range values to display like shown below: -
0 10 20 30
_| _|___|____|___|
0|
|
10-
|
20-
|
30 -
They should both start from 0 and increment from there.
Thanks again.
Look for this method in the docs
Code: Select all
public void setInverted(boolean flag)