This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

cewolf XY Chart

 
sourav dalal
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using cewolf 1.1 prepared by ulfdittmer. Can anbody suggest how to put custom labels in X & Y. Also I want to use the Timeseries chart for Time.class. But it is giving error for Null Time argument.
The follwing code is for producing graph for 10th to 31 Dec 2008.

TimeSeries ts = new TimeSeries("Cewolf Release Schedule", Day.class);
int j=3;
Date [] dates = new Date[21] ;
DateFormat df = java.text.DateFormat.getDateInstance(DateFormat.DEFAULT);
try {
for(int i=0;i<21;i++){
int day = i+10;
String date= day+"/12/2008";
dates[0] = df.parse(date);
}

} catch (Exception ex){

}
for(int i=0;i<21;i++) {
j=j+i;
ts.add(new Day(dates[i]), j);
}
return new TimeSeriesCollection(ts);
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can anbody suggest how to put custom labels in X & Y.

I don't understand what you mean by this. Can you describe in detail what you're trying to do? What kind of chart, where you want to put the labels, what should go in the labels, etc. TellTheDetails

Also I want to use the Timeseries chart for Time.class. But it is giving error for Null Time argument.

Where are you using null arguments - which parameter in which method call? Does the documentation say that null arguments are OK?
 
sourav dalal
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i want to produce a graph for last 7 days, where the data is collected for every 5 mins.
While using timeseries with day class, it gets error due to duplicate data in same date, though
I have provided in "yyyy-MM-DD HH:mm:ss" style. So, I have used XY graph. But in XY graph,
the date in X axis is replaced with array index(Since it takes double as input).Can it be replaced with
a String value? Secondly, in XY graph the max in Y axis depend on Max value of series. Can
I produce a graph in Y axis with range of 0,25,50,100 irrespective of Max value in graph data?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic