A discussion forum for JFreeChart (a 2D chart library for the Java platform).
-
lionel
- Posts: 6
- Joined: Tue Mar 27, 2007 5:06 pm
Post
by lionel » Tue Mar 27, 2007 9:33 pm
Hi everybody,
I have a question regarding the zoom operation in the chart panel.
Currently it is possible to drag a certain interval and the panel will automatically zoom into this interval.
How can I programmatically zoom to a specific date (java.util.Date) ?
Let say I have several tasks and sub tasks between 1.1.2007 and 1.12-2007.
I want the panel to zoom to the tasks of the current day when displayed.
Do somebody have any idea ?
Thanks a lot in advance.
-
skunk
- Posts: 1087
- Joined: Thu Jun 02, 2005 10:14 pm
- Location: Brisbane, Australia
Post
by skunk » Tue Mar 27, 2007 10:38 pm
This is from the javadoc for org.jfree.chart.axis.DateAxis
You will find it easier to understand how this axis works if you bear in mind that it really displays/measures integer (or long) data, where the integers are milliseconds since midnight, 1-Jan-1970.