Ejemplo n.º 1
0
  public void removeData(ChartIdentifier chart) {
    assert (chart != null);

    dataset.removeRow(chart);

    fixChartColours();
  }
Ejemplo n.º 2
0
  /**
   * Limits the dataset to a particular serie.
   *
   * @param dataset the dataset
   * @param serie the serie
   * @return the dataset
   */
  public Dataset filterDatasetSeries(Dataset dataset, Vector series) {
    logger.debug("IN");
    DefaultCategoryDataset catDataset = (DefaultCategoryDataset) dataset;

    // keeps track of wich series has to be shown
    currentSeries = series;

    // List rowKeys=new Vector();

    List rowKeys = new Vector(catDataset.getRowKeys());

    for (Iterator iterator = rowKeys.iterator(); iterator.hasNext(); ) {
      String row = (String) iterator.next();
      if (!(series.contains(row))) {
        catDataset.removeRow(row);
        seriesNames.remove(row);
      }
    }

    logger.debug("OUT");
    return catDataset;
  }