Exemple #1
0
 /**
  * Builds a bar multiple series dataset using the provided values.
  *
  * @param titles the series titles
  * @param values the values
  * @return the XY multiple bar dataset
  */
 protected XYMultipleSeriesDataset buildBarDataset(String[] titles, List<double[]> values) {
   XYMultipleSeriesDataset dataset = new XYMultipleSeriesDataset();
   int length = titles.length;
   for (int i = 0; i < length; i++) {
     CategorySeries series = new CategorySeries(titles[i]);
     double[] v = values.get(i);
     int seriesLength = v.length;
     for (int k = 0; k < seriesLength; k++) {
       series.add(v[k]);
     }
     dataset.addSeries(series.toXYSeries());
   }
   return dataset;
 }