Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

BarSeries

By: a guest on Apr 3rd, 2013  |  syntax: Java  |  size: 0.57 KB  |  views: 27  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  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. }