cewolf with mysql

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

cewolf with mysql

Post by t » Tue Aug 27, 2002 8:48 am

I want to change data for plot graph .
x,y is data from mysql

DatasetProducer xyData = new DatasetProducer() {
public Object produceDataset(HashMap params) {
XYSeries xys = new XYSeries("Toke XY Dataset");


for(int i = 1; i <= isto_max1; i++){
//double y =((Math.random()));
//xys.add((double)i, y);

String sql=
"select x,y from table ";
ResultSet rs=stmt.executeQuery(sql);
while(rs.next()){
x=rs.getDouble("x");
y=rs.getDouble("y");
xys.add(x,y);
}


}
return new XYSeriesCollection(xys);
}
};


but It's not work,Please search method is success.

Guido Laures

Re: cewolf with mysql

Post by Guido Laures » Tue Aug 27, 2002 9:42 am

Please post your cewolf related questions in the cewolf help forums.

Locked