public void addDataSet(T d){
  if (d == null)   return;
  mYValCount+=d.getEntryCount();
  mYValueSum+=d.getYValueSum();
  if (mDataSets.size() <= 0) {
    mYMax=d.getYMax();
    mYMin=d.getYMin();
    if (d.getAxisDependency() == AxisDependency.LEFT) {
      mLeftAxisMax=d.getYMax();
      mLeftAxisMin=d.getYMin();
    }
 else {
      mRightAxisMax=d.getYMax();
      mRightAxisMin=d.getYMin();
    }
  }
 else {
    if (mYMax < d.getYMax())     mYMax=d.getYMax();
    if (mYMin > d.getYMin())     mYMin=d.getYMin();
    if (d.getAxisDependency() == AxisDependency.LEFT) {
      if (mLeftAxisMax < d.getYMax())       mLeftAxisMax=d.getYMax();
      if (mLeftAxisMin > d.getYMin())       mLeftAxisMin=d.getYMin();
    }
 else {
      if (mRightAxisMax < d.getYMax())       mRightAxisMax=d.getYMax();
      if (mRightAxisMin > d.getYMin())       mRightAxisMin=d.getYMin();
    }
  }
  mDataSets.add(d);
  handleEmptyAxis(getFirstLeft(),getFirstRight());
}

public void addDataSet ( T d ) { if ( d == null ) return ; mYValCount += d . getEntryCount ( ) ; mYValueSum += d . getYValueSum ( ) ; if ( mDataSets . size ( ) <= 0 ) { mYMax = d . getYMax ( ) ; mYMin = d . getYMin ( ) ; if ( d . getAxisDependency ( ) == AxisDependency . LEFT ) { mLeftAxisMax = d . getYMax ( ) ; mLeftAxisMin = d . getYMin ( ) ; } else { mRightAxisMax = d . getYMax ( ) ; mRightAxisMin = d . getYMin ( ) ; } } else { if ( mYMax < d . getYMax ( ) ) mYMax = d . getYMax ( ) ; if ( mYMin > d . getYMin ( ) ) mYMin = d . getYMin ( ) ; if ( d . getAxisDependency ( ) == AxisDependency . LEFT ) { if ( mLeftAxisMax < d . getYMax ( ) ) mLeftAxisMax = d . getYMax ( ) ; if ( mLeftAxisMin > d . getYMin ( ) ) mLeftAxisMin = d . getYMin ( ) ; } else { if ( mRightAxisMax < d . getYMax ( ) ) mRightAxisMax = d . getYMax ( ) ; if ( mRightAxisMin > d . getYMin ( ) ) mRightAxisMin = d . getYMin ( ) ; } } mDataSets . add ( d ) ; handleEmptyAxis ( getFirstLeft ( ) , getFirstRight ( ) ) ; }
adds a dataset dynamically .
