Help with TimeSeriesChart

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

Help with TimeSeriesChart

Post by Rudra A Dixit » Mon Jan 28, 2002 5:22 pm

Hi everyone,

I'm developing an application which queries a database to see how many users connected to my site in a specified interval. Here's my question:

When I use long intervals (for example, from 01/15/2002 01:00 until 01/23/2002 23:00), JFreeChart separates the x-axis by days. If I use small intervals (for example, from 01/15/2002 01:00 until 01/15/2002 23:00), it separates by hours. How can I configure the
x-axis, setting it, for example, always with a 3 hour interval? No matter what the query interval is (small or long), JFreeChart would always separate the x-axis from 3 to 3 hours.

David Gilbert

RE: Help with TimeSeriesChart

Post by David Gilbert » Tue Jan 29, 2002 9:59 am

Hi Rudra,

You need to call the setTickUnit(...) method in DateAxis. It looks as though the code is missing the following line in that method though:

this.autoTickUnitSelection = false;
That will stop the axis from then going and overriding your new setting with an auto-selection. I'll fix that for 0.7.2...

Regards,

Dave Gilbert.

Locked