Problem with removeSeries

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Christelle
Posts: 6
Joined: Tue Mar 28, 2006 10:45 am

Problem with removeSeries

Post by Christelle » Thu May 18, 2006 4:52 pm

I have a lot of series . I would like to choose a serie and remove it. But somethimes it not work and it remove another serie.


//seriesdata is a XYSeriesCollection
if( connectionNames.contains(link)){ this.seriesdata.removeSeries(this.seriesdata.getSeries(this.seriesdata.indexOf(link)));
}

thanks,

david.gilbert
JFreeChart Project Leader
Posts: 11734
Joined: Fri Mar 14, 2003 10:29 am
antibot: No, of course not.
Contact:

Post by david.gilbert » Fri May 19, 2006 10:14 am

Are your series names unique within the collection? They need to be.
David Gilbert
JFreeChart Project Leader

:idea: Read my blog
:idea: Support JFree via the Github sponsorship program

Locked