timeseries chart problem when month changes

Discussion about JFreeChart related to stockmarket charts.
Locked
vineet semwal
Posts: 2
Joined: Thu Aug 06, 2009 4:33 pm
antibot: No, of course not.

timeseries chart problem when month changes

Post by vineet semwal » Thu Aug 06, 2009 4:57 pm

Hellos,
I am generating a timeseries chart with 7 days data which works fine till the month changes in between.
when month changes in between it starts giving me wrong result .

Following is the small snippet of how i am creating dataset ..

public XYDataset createDataSet(String stockSymbol, String scripSeries) {
TimeSeries series = new TimeSeries("Stock Last 7 Days", Day.class);
List<Stock> hist = stockService.getLast7DaysStocks(stockSymbol, scripSeries);
for (Stock temp : hist) {
DateTime dateTime = new DateTime(temp.getLastDate());
series.add(new Day(dateTime.getDayOfMonth(), dateTime.getMonthOfYear(),
dateTime.getYear()), temp.getClosePrice());
logger.info("last date" + temp.getLastDate());
}

TimeSeriesCollection seriesCollection = new TimeSeriesCollection();
seriesCollection.addSeries(series);
return seriesCollection;
}

regards,
Vineet Semwal

vineet semwal
Posts: 2
Joined: Thu Aug 06, 2009 4:33 pm
antibot: No, of course not.

Re: timeseries chart problem when month changes

Post by vineet semwal » Sat Aug 08, 2009 11:14 am

never mind, while debugging i realized wrong dates were fed to create dataset .

regards,
Vineet Semwal

Locked