SHARE
TWEET

BarSeries

a guest Apr 3rd, 2013 29 Never
  1. public class BarSeries extends AbstractSeries {
  2.  
  3.         @Override
  4.         public void drawPoint(Canvas canvas, AbstractPoint point, float scaleX, float scaleY, Rect gridBounds) {
  5.                 final float x = (float) (gridBounds.left + (scaleX * (point.getX() - getMinX())));
  6.                 final float y = (float) (gridBounds.bottom - (scaleY * (point.getY() - getMinY())));
  7.  
  8.                 canvas.drawLine(x,gridBounds.bottom, x, y, mPaint);
  9.         }
  10.  
  11.         public static class LinearPoint extends AbstractPoint {
  12.                 public LinearPoint() {
  13.                         super();
  14.                 }
  15.  
  16.                 public LinearPoint(double x, double y) {
  17.                         super(x, y);
  18.                 }
  19.         }
  20. }
RAW Paste Data
Top