protected List createStackedValueList(CategoryDataset dataset,Comparable category,int[] includedRows,double base,boolean asPercentages){
  List result=new ArrayList();
  double posBase=base;
  double negBase=base;
  double total=0.0;
  if (asPercentages) {
    total=DataUtilities.calculateColumnTotal(dataset,dataset.getColumnIndex(category),includedRows);
  }
  int baseIndex=-1;
  int rowCount=includedRows.length;
  for (int i=0; i < rowCount; i++) {
    int r=includedRows[i];
    Number n=dataset.getValue(dataset.getRowKey(r),category);
    if (n == null) {
      continue;
    }
    double v=n.doubleValue();
    if (asPercentages) {
      v=v / total;
    }
    if ((v > 0.0) || (!this.ignoreZeroValues && v >= 0.0)) {
      if (baseIndex < 0) {
        result.add(new Object[]{null,new Double(base)});
        baseIndex=0;
      }
      posBase=posBase + v;
      result.add(new Object[]{new Integer(r),new Double(posBase)});
    }
 else     if (v < 0.0) {
      if (baseIndex < 0) {
        result.add(new Object[]{null,new Double(base)});
        baseIndex=0;
      }
      negBase=negBase + v;
      result.add(0,new Object[]{new Integer(-r - 1),new Double(negBase)});
      baseIndex++;
    }
  }
  return result;
}

protected List createStackedValueList ( CategoryDataset dataset , Comparable category , int [ ] includedRows , double base , boolean asPercentages ) { List result = new ArrayList ( ) ; double posBase = base ; double negBase = base ; double total = 0.0 ; if ( asPercentages ) { total = DataUtilities . calculateColumnTotal ( dataset , dataset . getColumnIndex ( category ) , includedRows ) ; } int baseIndex = - 1 ; int rowCount = includedRows . length ; for ( int i = 0 ; i < rowCount ; i ++ ) { int r = includedRows [ i ] ; Number n = dataset . getValue ( dataset . getRowKey ( r ) , category ) ; if ( n == null ) { continue ; } double v = n . doubleValue ( ) ; if ( asPercentages ) { v = v / total ; } if ( ( v > 0.0 ) || ( ! this . ignoreZeroValues && v >= 0.0 ) ) { if ( baseIndex < 0 ) { result . add ( new Object [ ] { null , new Double ( base ) } ) ; baseIndex = 0 ; } posBase = posBase + v ; result . add ( new Object [ ] { new Integer ( r ) , new Double ( posBase ) } ) ; } else if ( v < 0.0 ) { if ( baseIndex < 0 ) { result . add ( new Object [ ] { null , new Double ( base ) } ) ; baseIndex = 0 ; } negBase = negBase + v ; result . add ( 0 , new Object [ ] { new Integer ( - r - 1 ) , new Double ( negBase ) } ) ; baseIndex ++ ; } } return result ; }
returns a list containing the stacked values for the specified series in the given dataset , plus the supplied base value .
