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
timeseries chart problem when month changes
-
- Posts: 2
- Joined: Thu Aug 06, 2009 4:33 pm
- antibot: No, of course not.
-
- Posts: 2
- Joined: Thu Aug 06, 2009 4:33 pm
- antibot: No, of course not.
Re: timeseries chart problem when month changes
never mind, while debugging i realized wrong dates were fed to create dataset .
regards,
Vineet Semwal
regards,
Vineet Semwal