Hi,
I have a TimeSeriesChart and building an moving average.
How can I only show the moving average chart in my plot. In the moment, there will be both DataSeries displayed(the primary from the XYDataset and the averaged).
I only need the averaged for my Chart.
This is a part of my code:
XYDataset xyData1 = DemoDaten.createTimeSeriesCollection(30);
MovingAveragePlotFitAlgorithm mavg = new MovingAveragePlotFitAlgorithm();
mavg.setPeriod(3);
PlotFit pf = new PlotFit(xyData1, mavg);
XYDataset xyData5 = pf.getFit();
chart = ChartFactory.createTimeSeriesChart("Time Series Chart",
"Daimler Chrysler " + runtime.getDatum() + " ",
"",
xyData5,false);
thanks for each reply
regards
Joachim
Showing only the averaged data
Re: Showing only the averaged data
Hi Joachim,
Unfortunately the moving average code returns a dataset containing both the original data and the moving average. I've been meaning to rewrite this class, but have not found the time yet.
One temporary solution might be to use the SubSeriesDataset, which was written as part of the combined charts implementation.
Regards,
DG.
Unfortunately the moving average code returns a dataset containing both the original data and the moving average. I've been meaning to rewrite this class, but have not found the time yet.
One temporary solution might be to use the SubSeriesDataset, which was written as part of the combined charts implementation.
Regards,
DG.