protected void drawChartValuesText(Canvas canvas,XYSeries series,XYSeriesRenderer renderer,Paint paint,List<Float> points,int seriesIndex,int startIndex){
  if (points.size() > 1) {
    float previousPointX=points.get(0);
    float previousPointY=points.get(1);
    for (int k=0; k < points.size(); k+=2) {
      if (k == 2) {
        if (Math.abs(points.get(2) - points.get(0)) > renderer.getDisplayChartValuesDistance() || Math.abs(points.get(3) - points.get(1)) > renderer.getDisplayChartValuesDistance()) {
          drawText(canvas,getLabel(renderer.getChartValuesFormat(),series.getY(startIndex)),points.get(0),points.get(1) - renderer.getChartValuesSpacing(),paint,0);
          drawText(canvas,getLabel(renderer.getChartValuesFormat(),series.getY(startIndex + 1)),points.get(2),points.get(3) - renderer.getChartValuesSpacing(),paint,0);
          previousPointX=points.get(2);
          previousPointY=points.get(3);
        }
      }
 else       if (k > 2) {
        if (Math.abs(points.get(k) - previousPointX) > renderer.getDisplayChartValuesDistance() || Math.abs(points.get(k + 1) - previousPointY) > renderer.getDisplayChartValuesDistance()) {
          drawText(canvas,getLabel(renderer.getChartValuesFormat(),series.getY(startIndex + k / 2)),points.get(k),points.get(k + 1) - renderer.getChartValuesSpacing(),paint,0);
          previousPointX=points.get(k);
          previousPointY=points.get(k + 1);
        }
      }
    }
  }
 else {
    for (int k=0; k < points.size(); k+=2) {
      drawText(canvas,getLabel(renderer.getChartValuesFormat(),series.getY(startIndex + k / 2)),points.get(k),points.get(k + 1) - renderer.getChartValuesSpacing(),paint,0);
    }
  }
}

protected void drawChartValuesText ( Canvas canvas , XYSeries series , XYSeriesRenderer renderer , Paint paint , List < Float > points , int seriesIndex , int startIndex ) { if ( points . size ( ) > 1 ) { float previousPointX = points . get ( 0 ) ; float previousPointY = points . get ( 1 ) ; for ( int k = 0 ; k < points . size ( ) ; k += 2 ) { if ( k == 2 ) { if ( Math . abs ( points . get ( 2 ) - points . get ( 0 ) ) > renderer . getDisplayChartValuesDistance ( ) || Math . abs ( points . get ( 3 ) - points . get ( 1 ) ) > renderer . getDisplayChartValuesDistance ( ) ) { drawText ( canvas , getLabel ( renderer . getChartValuesFormat ( ) , series . getY ( startIndex ) ) , points . get ( 0 ) , points . get ( 1 ) - renderer . getChartValuesSpacing ( ) , paint , 0 ) ; drawText ( canvas , getLabel ( renderer . getChartValuesFormat ( ) , series . getY ( startIndex + 1 ) ) , points . get ( 2 ) , points . get ( 3 ) - renderer . getChartValuesSpacing ( ) , paint , 0 ) ; previousPointX = points . get ( 2 ) ; previousPointY = points . get ( 3 ) ; } } else if ( k > 2 ) { if ( Math . abs ( points . get ( k ) - previousPointX ) > renderer . getDisplayChartValuesDistance ( ) || Math . abs ( points . get ( k + 1 ) - previousPointY ) > renderer . getDisplayChartValuesDistance ( ) ) { drawText ( canvas , getLabel ( renderer . getChartValuesFormat ( ) , series . getY ( startIndex + k / 2 ) ) , points . get ( k ) , points . get ( k + 1 ) - renderer . getChartValuesSpacing ( ) , paint , 0 ) ; previousPointX = points . get ( k ) ; previousPointY = points . get ( k + 1 ) ; } } } } else { for ( int k = 0 ; k < points . size ( ) ; k += 2 ) { drawText ( canvas , getLabel ( renderer . getChartValuesFormat ( ) , series . getY ( startIndex + k / 2 ) ) , points . get ( k ) , points . get ( k + 1 ) - renderer . getChartValuesSpacing ( ) , paint , 0 ) ; } } }
the graphical representation of the series values as text .
