@Override public Range findRangeBounds(CategoryDataset dataset){
  if (dataset == null) {
    return null;
  }
  boolean allItemsNull=true;
  double minimum=0.0;
  double maximum=0.0;
  int columnCount=dataset.getColumnCount();
  for (int row=0; row < dataset.getRowCount(); row++) {
    double runningTotal=0.0;
    for (int column=0; column <= columnCount - 1; column++) {
      Number n=dataset.getValue(row,column);
      if (n != null) {
        allItemsNull=false;
        double value=n.doubleValue();
        if (column == columnCount - 1) {
          runningTotal=value;
        }
 else {
          runningTotal=runningTotal + value;
        }
        minimum=Math.min(minimum,runningTotal);
        maximum=Math.max(maximum,runningTotal);
      }
    }
  }
  if (!allItemsNull) {
    return new Range(minimum,maximum);
  }
 else {
    return null;
  }
}

@ Override public Range findRangeBounds ( CategoryDataset dataset ) { if ( dataset == null ) { return null ; } boolean allItemsNull = true ; double minimum = 0.0 ; double maximum = 0.0 ; int columnCount = dataset . getColumnCount ( ) ; for ( int row = 0 ; row < dataset . getRowCount ( ) ; row ++ ) { double runningTotal = 0.0 ; for ( int column = 0 ; column <= columnCount - 1 ; column ++ ) { Number n = dataset . getValue ( row , column ) ; if ( n != null ) { allItemsNull = false ; double value = n . doubleValue ( ) ; if ( column == columnCount - 1 ) { runningTotal = value ; } else { runningTotal = runningTotal + value ; } minimum = Math . min ( minimum , runningTotal ) ; maximum = Math . max ( maximum , runningTotal ) ; } } } if ( ! allItemsNull ) { return new Range ( minimum , maximum ) ; } else { return null ; } }
returns the range of values the renderer requires to display all the items from the specified dataset .
