@SuppressWarnings("unchecked") public void addEntry(Entry e){
  if (e == null)   return;
  float val=e.getVal();
  if (mYVals == null) {
    mYVals=new ArrayList<T>();
  }
  if (mYVals.size() == 0) {
    mYMax=val;
    mYMin=val;
  }
 else {
    if (mYMax < val)     mYMax=val;
    if (mYMin > val)     mYMin=val;
  }
  mYValueSum+=val;
  mYVals.add((T)e);
}

@ SuppressWarnings ( "unchecked" ) public void addEntry ( Entry e ) { if ( e == null ) return ; float val = e . getVal ( ) ; if ( mYVals == null ) { mYVals = new ArrayList < T > ( ) ; } if ( mYVals . size ( ) == 0 ) { mYMax = val ; mYMin = val ; } else { if ( mYMax < val ) mYMax = val ; if ( mYMin > val ) mYMin = val ; } mYValueSum += val ; mYVals . add ( ( T ) e ) ; }
adds an entry to the dataset dynamically . this will also recalculate the current minimum and maximum values of the dataset and the value - sum .
