how we set the space in XAxis

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Rajnesh
Posts: 19
Joined: Thu Jan 03, 2008 8:48 am

how we set the space in XAxis

Post by Rajnesh » Tue Jan 08, 2008 7:35 am

Hi
I have a problem to set the margin of XAxis.I want some space left beyond the upperbound of XAxis Range
like suppose this dot(.) is the vertical line of graph ( . 1 2 3 4 5 6 .) there is space before 1 and after 6.Ialso want this type of space in my graph

can u plzz help me to solve this problem..................
Awaiting for ur Reply
Thanx

david.gilbert
JFreeChart Project Leader
Posts: 11734
Joined: Fri Mar 14, 2003 10:29 am
antibot: No, of course not.
Contact:

Post by david.gilbert » Tue Jan 08, 2008 9:56 am

You can use the setLowerMargin() and setUpperMargin() methods in the axis class.
David Gilbert
JFreeChart Project Leader

:idea: Read my blog
:idea: Support JFree via the Github sponsorship program

Rajnesh
Posts: 19
Joined: Thu Jan 03, 2008 8:48 am

how we set the space in XAxis

Post by Rajnesh » Wed Jan 09, 2008 5:51 am

Hi
the setLowerMargin() and SetUpperMargin() is not working.
Is there is nay other way...........
plzz help me
Awaiting for ur reply
Thanx

david.gilbert
JFreeChart Project Leader
Posts: 11734
Joined: Fri Mar 14, 2003 10:29 am
antibot: No, of course not.
Contact:

Re: how we set the space in XAxis

Post by david.gilbert » Wed Jan 09, 2008 12:16 pm

Rajnesh wrote:the setLowerMargin() and SetUpperMargin() is not working.
"not working" is not a helpful description. You need to state (1) what you did (for example, what arguments you passed to setLowerMargin()/setUpperMargin()), (2) what you saw (best if you post a screenshot) and (3) what you expected to see. Once I know these three things, I can tell you where the problem is.
David Gilbert
JFreeChart Project Leader

:idea: Read my blog
:idea: Support JFree via the Github sponsorship program

Locked