#110 jfreechart changed

open
None
5
2007-01-17
2006-02-27
maurizio
No

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)

Discussion

  • maurizio

    maurizio - 2006-02-27
     
  • David Gilbert

    David Gilbert - 2007-01-17
    • assigned_to: nobody --> mungady
     
  • David Gilbert

    David Gilbert - 2007-01-17

    Logged In: YES
    user_id=112975
    Originator: NO

    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.

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks