program which creates and displays a time series plot, and then
dynamically -- in response to the user pressing a button -- adds an
overlaid time series. All the overlays share the same domain and range
axes as the main plot in this example. The overlay code is basically this:
Code: Select all
TimeSeriesCollection ds = // get the additional series...
XYPlot plot = _mainChart.getXYPlot();
int k = plot.getDatasetCount();
plot.setDataset(k, ds);
plot.setRenderer(k, new StandardXYItemRenderer());
plot.mapDatasetToRangeAxis(k, 0);
Is there a method whereby I can delete the overlaid series plot
while still retaining the original main plot (and hopefully other
independently overlaid graphs)?? I get the feeling that things are
handled as panes (but I haven't drilled down far enough in the code
yet to really have understanding), so is there a way to "erase"
pane #k above??
Or is there a significantly different approach to achieve the same goal:
Create a basic plot, and then dynamically add and delete overlays in
response to user button presses??
Many thanks,