Hello,
I am trying to create a Combined Plot containing a High/Low Plot and a Moving Average Plot over a period of time. I place enough data into the DataSet so that it can generate values for the moving average. However, I do not want to display all data values.
For example, I only want to see data on the chart for the past 7 days. However, in order to create a 50-day moving average for those 7 days, I need to insert 50 extra days' worth of data. When it comes time to display the chart, I cannot hide the extra 50 days.
I have tried the following:
HorizontalDateAxis hda = (HorizontalDateAxis)plot.getHorizontalAxis();
hda.setAutoRange(false);
hda.setMinimumDate(new Date(minimumDateString));
hda.setMaximumDate(new Date(maximumDateString));
When I do gets on the min and max dates after setting them, they are still at their original values. How can I get this to work?
Thanks,
Troy
HorizontalDateAxis - Changing the Date Range
Re: HorizontalDateAxis - Changing the Date Range
One of the difficulties of the current combined plot implementation is that there are axes all over the place, and it can be difficult to know which one is in control (I'm still not really sure). I've revised the code quite a lot for the next version of JFreeChart to make this easier to work with. You might want to check out the latest code from CVS on SourceForge.
Regards,
DG
Regards,
DG
Re: HorizontalDateAxis - Changing the Date Range
Ok, I'll give that a try.
Thanks,
Troy
Thanks,
Troy