I've added this method in JFreeChart.java:
public void changePlot(Plot newPlot)
This, because, after to create an object of type
JFreeChart, I don't found any way to change the plot
object from one type (xyPlot) to another (catPlot)
Logged In: YES
An old one, I know, but...
I think this is a good idea, but there's more to it than just changing the plot. First, the chart instance is registered as a listener on the existing plot, so you need to deregister it. Then you need to register the chart as a listener on the new plot, otherwise automatic repaints (on the ChartPanel, for instance) will stop working. And then you need to consider the chart's legend(s), which reference the current plot - you could either remove the legend(s), or somehow swap the plot reference from the old plot to the new plot.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.