hi there...
im trying to create a multiple data set TimeSeriesChart.... the thing is, i recolect data from a data base (datatime (TIMESTAMP) , value (DOUBLE)) ... but, i have values recolected that have same timestamps in my DB (wich is suposse to be like that...), something like this:
+-------------+-----------+---------------------+
| template_id | value | datatime |
+-------------+-----------+---------------------+
| 1 | 2.2 | 2008-05-09 09:29:00 |
| 1 | 1.7 | 2008-05-09 09:22:00 |
| 1 | 1.2 | 2008-05-09 09:15:00 |
| 1 | 0.7 | 2008-05-09 09:08:00 |
| 1 | 0.2 | 2008-05-09 09:01:00 |
| 2 | 4 | 2008-05-09 09:29:00 |
| 2 | 3 | 2008-05-09 09:22:00 |
| 2 | 2 | 2008-05-09 09:15:00 |
| 2 | 1 | 2008-05-09 09:08:00 |
| 2 | 0 | 2008-05-09 09:01:00 |
| 3 | 3.1000001 | 2008-05-09 09:29:00 |
| 3 | 2.4 | 2008-05-09 09:22:00 |
| 3 | 1.7 | 2008-05-09 09:15:00 |
| 3 | 1 | 2008-05-09 09:08:00 |
| 3 | 0.3 | 2008-05-09 09:01:00 |
+-------------+-----------+---------------------+
but i get this error:
org.jfree.data.general.SeriesException: You are attempting to add an observation for the time period 20-mayo-2008 but the series already contains an observation for that time period. Duplicates are not permitted.
who can i let jfreechart to draw my graphics no matter if the period of other serie is duplicated...
thx.
ps: does anyone knows how to do timeseries chart in iReports? i only get doted lines (i suposse its because the same reason: i cant duplicate periods).... thx
TimeSeriesChart Question!
lol !!! thx... im glad u understand even w/my terrible english...
i have other question... i get from my DB a timestamp (thats what i want to put on my X axis)... (i want that it shows like: 09:00:00 09:00:20 .... and so on)...
how should i pass the parameter to the addorupdate?
series.addOrUpdate( <timestamp> , new Double(rs.getString("value")));
timstamp: rs.getString("datatime") ....
THXXXXXXXXXXX
i have other question... i get from my DB a timestamp (thats what i want to put on my X axis)... (i want that it shows like: 09:00:00 09:00:20 .... and so on)...
how should i pass the parameter to the addorupdate?
series.addOrUpdate( <timestamp> , new Double(rs.getString("value")));
timstamp: rs.getString("datatime") ....
THXXXXXXXXXXX
