Push DateAxis to line up with the range axis

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
tox0tes
Posts: 34
Joined: Tue Aug 05, 2008 7:05 pm

Push DateAxis to line up with the range axis

Post by tox0tes » Thu Sep 04, 2008 9:08 pm

How would I push the first tick mark of the DateAxis to line up with the range axis. Take a look at this picture:

Image

skunk
Posts: 1087
Joined: Thu Jun 02, 2005 10:14 pm
Location: Brisbane, Australia

Post by skunk » Thu Sep 04, 2008 9:48 pm

Did you try these methods of org.jfree.chart.axis.ValueAxis

Code: Select all

public void setLowerMargin(double margin)
public void setUpperMargin(double margin)

tox0tes
Posts: 34
Joined: Tue Aug 05, 2008 7:05 pm

Post by tox0tes » Thu Sep 04, 2008 10:04 pm

yeah i just tried that and it didn't do anything... but doesn't that affect the vertical margins? i am looking for the horizontal (left and right)

skunk
Posts: 1087
Joined: Thu Jun 02, 2005 10:14 pm
Location: Brisbane, Australia

Post by skunk » Thu Sep 04, 2008 11:27 pm

Code: Select all

plot.getDomainAxis().setLowerMargin(0);
plot.getDomainAxis().setUpperMargin(0);

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 » Fri Sep 05, 2008 1:23 pm

I agree with Skunk.
David Gilbert
JFreeChart Project Leader

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

tox0tes
Posts: 34
Joined: Tue Aug 05, 2008 7:05 pm

Post by tox0tes » Fri Sep 05, 2008 9:50 pm

thanks, that worked. I had to modify a little bit because 0 made the 0'00" not display:

Code: Select all

plot.getDomainAxis().setLowerMargin(.0001);
plot.getDomainAxis().setUpperMargin(.0001);

Locked