protected void computeAxisValues(float min,float max){
  float yMin=min;
  float yMax=max;
  int labelCount=mYAxis.getLabelCount();
  double range=Math.abs(yMax - yMin);
  if (labelCount == 0 || range <= 0) {
    mYAxis.mEntries=new float[]{};
    mYAxis.mEntryCount=0;
    return;
  }
  double rawInterval=range / labelCount;
  double interval=Utils.roundToNextSignificant(rawInterval);
  if (mYAxis.isGranularityEnabled())   interval=interval < mYAxis.getGranularity() ? mYAxis.getGranularity() : interval;
  double intervalMagnitude=Utils.roundToNextSignificant(Math.pow(10,(int)Math.log10(interval)));
  int intervalSigDigit=(int)(interval / intervalMagnitude);
  if (intervalSigDigit > 5) {
    interval=Math.floor(10 * intervalMagnitude);
  }
  if (mYAxis.isForceLabelsEnabled()) {
    float step=(float)range / (float)(labelCount - 1);
    mYAxis.mEntryCount=labelCount;
    if (mYAxis.mEntries.length < labelCount) {
      mYAxis.mEntries=new float[labelCount];
    }
    float v=min;
    for (int i=0; i < labelCount; i++) {
      mYAxis.mEntries[i]=v;
      v+=step;
    }
  }
 else {
    if (mYAxis.isShowOnlyMinMaxEnabled()) {
      mYAxis.mEntryCount=2;
      mYAxis.mEntries=new float[2];
      mYAxis.mEntries[0]=yMin;
      mYAxis.mEntries[1]=yMax;
    }
 else {
      double first=interval == 0.0 ? 0.0 : Math.ceil(yMin / interval) * interval;
      double last=interval == 0.0 ? 0.0 : Utils.nextUp(Math.floor(yMax / interval) * interval);
      double f;
      int i;
      int n=0;
      if (interval != 0.0) {
        for (f=first; f <= last; f+=interval) {
          ++n;
        }
      }
      mYAxis.mEntryCount=n;
      if (mYAxis.mEntries.length < n) {
        mYAxis.mEntries=new float[n];
      }
      for (f=first, i=0; i < n; f+=interval, ++i) {
        if (f == 0.0)         f=0.0;
        mYAxis.mEntries[i]=(float)f;
      }
    }
  }
  if (interval < 1) {
    mYAxis.mDecimals=(int)Math.ceil(-Math.log10(interval));
  }
 else {
    mYAxis.mDecimals=0;
  }
}

protected void computeAxisValues ( float min , float max ) { float yMin = min ; float yMax = max ; int labelCount = mYAxis . getLabelCount ( ) ; double range = Math . abs ( yMax - yMin ) ; if ( labelCount == 0 || range <= 0 ) { mYAxis . mEntries = new float [ ] { } ; mYAxis . mEntryCount = 0 ; return ; } double rawInterval = range / labelCount ; double interval = Utils . roundToNextSignificant ( rawInterval ) ; if ( mYAxis . isGranularityEnabled ( ) ) interval = interval < mYAxis . getGranularity ( ) ? mYAxis . getGranularity ( ) : interval ; double intervalMagnitude = Utils . roundToNextSignificant ( Math . pow ( 10 , ( int ) Math . log10 ( interval ) ) ) ; int intervalSigDigit = ( int ) ( interval / intervalMagnitude ) ; if ( intervalSigDigit > 5 ) { interval = Math . floor ( 10 * intervalMagnitude ) ; } if ( mYAxis . isForceLabelsEnabled ( ) ) { float step = ( float ) range / ( float ) ( labelCount - 1 ) ; mYAxis . mEntryCount = labelCount ; if ( mYAxis . mEntries . length < labelCount ) { mYAxis . mEntries = new float [ labelCount ] ; } float v = min ; for ( int i = 0 ; i < labelCount ; i ++ ) { mYAxis . mEntries [ i ] = v ; v += step ; } } else { if ( mYAxis . isShowOnlyMinMaxEnabled ( ) ) { mYAxis . mEntryCount = 2 ; mYAxis . mEntries = new float [ 2 ] ; mYAxis . mEntries [ 0 ] = yMin ; mYAxis . mEntries [ 1 ] = yMax ; } else { double first = interval == 0.0 ? 0.0 : Math . ceil ( yMin / interval ) * interval ; double last = interval == 0.0 ? 0.0 : Utils . nextUp ( Math . floor ( yMax / interval ) * interval ) ; double f ; int i ; int n = 0 ; if ( interval != 0.0 ) { for ( f = first ; f <= last ; f += interval ) { ++ n ; } } mYAxis . mEntryCount = n ; if ( mYAxis . mEntries . length < n ) { mYAxis . mEntries = new float [ n ] ; } for ( f = first , i = 0 ; i < n ; f += interval , ++ i ) { if ( f == 0.0 ) f = 0.0 ; mYAxis . mEntries [ i ] = ( float ) f ; } } } if ( interval < 1 ) { mYAxis . mDecimals = ( int ) Math . ceil ( - Math . log10 ( interval ) ) ; } else { mYAxis . mDecimals = 0 ; } }
sets up the y - axis labels . computes the desired number of labels between the two given extremes . unlike the paparexlabels ( ) method , this method needs to be called upon every refresh of the view .
