Time Chart

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

Time Chart

Post by Leonard » Thu Jun 27, 2002 5:12 am

I wish to create the time chart and retrive the data from the database and display it in the database dynamically ! below is the sample code that is static so how can i create it dynamically to retrieve data from database

public void doGet(HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException{

//super(title);
this.series = new BasicTimeSeries("Quarterly Data", Quarter.class);
this.series.add(new Quarter(1, 2001), 500.2);
this.series.add(new Quarter(2, 2001), 694.1);

David Gilbert

Re: Time Chart

Post by David Gilbert » Sun Jun 30, 2002 8:07 pm

I haven't written any code that reads time series data from a database, but it can't be all that difficult. At some point I will write something, but someone else may get there before I do...

Regards,

DG.

Bryan

Re: Time Chart

Post by Bryan » Mon Jul 01, 2002 9:04 am

Leonard

JdbcXYDataset supports timeseries. use the executeQuery method.
The query should be in the form :
select time, value1, value2, ... from table where ....

Bryan

Locked