@Override public void drawSeries(Canvas canvas,Paint paint,List<Float> points,XYSeriesRenderer renderer,float yAxisValue,int seriesIndex,int startIndex){
  paint.setColor(renderer.getColor());
  final float stroke=paint.getStrokeWidth();
  if (renderer.isFillPoints()) {
    paint.setStyle(Style.FILL);
  }
 else {
    paint.setStrokeWidth(renderer.getPointStrokeWidth());
    paint.setStyle(Style.STROKE);
  }
  int length=points.size();
switch (renderer.getPointStyle()) {
case X:
    paint.setStrokeWidth(renderer.getPointStrokeWidth());
  for (int i=0; i < length; i+=2) {
    drawX(canvas,paint,points.get(i),points.get(i + 1));
  }
break;
case CIRCLE:
for (int i=0; i < length; i+=2) {
drawCircle(canvas,paint,points.get(i),points.get(i + 1));
}
break;
case TRIANGLE:
float[] path=new float[6];
for (int i=0; i < length; i+=2) {
drawTriangle(canvas,paint,path,points.get(i),points.get(i + 1));
}
break;
case SQUARE:
for (int i=0; i < length; i+=2) {
drawSquare(canvas,paint,points.get(i),points.get(i + 1));
}
break;
case DIAMOND:
path=new float[8];
for (int i=0; i < length; i+=2) {
drawDiamond(canvas,paint,path,points.get(i),points.get(i + 1));
}
break;
case POINT:
for (int i=0; i < length; i+=2) {
canvas.drawPoint(points.get(i),points.get(i + 1),paint);
}
break;
}
paint.setStrokeWidth(stroke);
}

@ Override public void drawSeries ( Canvas canvas , Paint paint , List < Float > points , XYSeriesRenderer renderer , float yAxisValue , int seriesIndex , int startIndex ) { paint . setColor ( renderer . getColor ( ) ) ; final float stroke = paint . getStrokeWidth ( ) ; if ( renderer . isFillPoints ( ) ) { paint . setStyle ( Style . FILL ) ; } else { paint . setStrokeWidth ( renderer . getPointStrokeWidth ( ) ) ; paint . setStyle ( Style . STROKE ) ; } int length = points . size ( ) ; switch ( renderer . getPointStyle ( ) ) { case X : paint . setStrokeWidth ( renderer . getPointStrokeWidth ( ) ) ; for ( int i = 0 ; i < length ; i += 2 ) { drawX ( canvas , paint , points . get ( i ) , points . get ( i + 1 ) ) ; } break ; case CIRCLE : for ( int i = 0 ; i < length ; i += 2 ) { drawCircle ( canvas , paint , points . get ( i ) , points . get ( i + 1 ) ) ; } break ; case TRIANGLE : float [ ] path = new float [ 6 ] ; for ( int i = 0 ; i < length ; i += 2 ) { drawTriangle ( canvas , paint , path , points . get ( i ) , points . get ( i + 1 ) ) ; } break ; case SQUARE : for ( int i = 0 ; i < length ; i += 2 ) { drawSquare ( canvas , paint , points . get ( i ) , points . get ( i + 1 ) ) ; } break ; case DIAMOND : path = new float [ 8 ] ; for ( int i = 0 ; i < length ; i += 2 ) { drawDiamond ( canvas , paint , path , points . get ( i ) , points . get ( i + 1 ) ) ; } break ; case POINT : for ( int i = 0 ; i < length ; i += 2 ) { canvas . drawPoint ( points . get ( i ) , points . get ( i + 1 ) , paint ) ; } break ; } paint . setStrokeWidth ( stroke ) ; }
the graphical representation of a series .
