Do with a loop for XYSeries JFreeChart

1

I am in the following situation. I have a arraylist of arraylist from which I want to draw a graph with JFreeChart. I have already created a series, but I need to be created automatically according to the positions of the arraylist, serie2, serie3 ...

To generate a single one I have the following code:

final XYSeries serie1 = new XYSeries("");
            num.add(new ArrayList<Double>());
            for(int i=1;i<grafica.size();i++){ 
                    for(int j=1;j<grafica.get(i).size();j++){  
                        aux = Double.parseDouble(grafica.get(i).get(j));
                        numTime=Double.parseDouble(grafica.get(0).get(j));
                                serie1.add( numTime, aux);
                                 }

* Graph is the arraylist.

Thank you very much.

    
asked by Pastri 12.06.2017 в 22:22
source

0 answers