Display date in the origin

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Jost Schulte

Display date in the origin

Post by Jost Schulte » Thu Feb 27, 2003 11:19 am

Hi,

I created a Gantt-Chart and set the x-axis (HorizontalDateAxis) to a certain range, because the tasks displayed in the chart didn't start at the origin of the x-axis.

After doing that the first and the last date are no longer shown. I tried everything I could but it didn't work. I saw examples where the horizontal date-labels start at the origin of the x-axis so I know there must be a possibility =)

I am grateful for any help.

Greetings,
Jost

Morpheus

Re: Display date in the origin

Post by Morpheus » Thu Feb 27, 2003 3:47 pm

As far as I know, in the refreshTicks of HorizontalDateAxis, last date is never displayed, first displayable date is calculated by method calculateLowestVisibleDate. Depending on ur DateTickUnit, it uses a general algorithm to round up dates...

Now for displaying dates from origin of xAxis, u have to call method setLowerMargin( 0 ), this will assure u that ticks are displayed from origin of x-axis, but doesn't assure u that the first date displayed is the min(date) u provided in ur dataset...

Hope this helps

Morpheus

Jost Schulte

Re: Display date in the origin

Post by Jost Schulte » Thu Feb 27, 2003 4:55 pm

Thank you at first!

Yes and no,

i think you understood my problem but it is not yet solved.

For you and everybody else I loaded up three examples to show what I mean. Please visit the following link and have a look at my problem: http://geocities.com/duller_jeff/

Thank you in advance, I would be glad if anyone could help me with this.

Jost

David Gilbert

Re: Display date in the origin

Post by David Gilbert » Fri Feb 28, 2003 12:58 am

Hi Jost,

I think Morpheus gave the answer I would have given for your original post. But your second post seems to be something different...but I'm not sure what you are getting at.

Regards,

Dave Gilbert

Locked