How can I define a domain axis of the current day only?

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
gerlun
Posts: 9
Joined: Mon Feb 11, 2008 4:32 pm

How can I define a domain axis of the current day only?

Post by gerlun » Fri Mar 14, 2008 7:04 pm

Code: Select all

SimpleDataFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm");
xAxis.setRange(sdf.parse("2008-03-08 10:00"), sdf.parse("2008-03-08 16:00"));
It always returns with the exception: java.lang.IllegalArgumentException: Requires 'lower' < 'upper'.

How can I solve it? Thx a lot!!

Ty
Posts: 19
Joined: Thu May 24, 2007 3:26 pm

Post by Ty » Mon Mar 17, 2008 3:39 pm

That above code works for me (with a minor spelling fix)... Using JFreeChart 1.0.9 and JDK/JRE 1.6.

Locked