// Path: src/com/ezio/multiwii/graph/GraphViewSeries.java
// static public class GraphViewSeriesStyle {
// 	public int color = 0xff0077cc;
// 	public int thickness = 3;
// 	private ValueDependentColor valueDependentColor;
// 
// 	public GraphViewSeriesStyle() {
// 		super();
// 	}
// 
// 	public GraphViewSeriesStyle(int color, int thickness) {
// 		super();
// 		this.color = color;
// 		this.thickness = thickness;
// 	}
// 
// 	public void setValueDependentColor(ValueDependentColor valueDependentColor) {
// 		this.valueDependentColor = valueDependentColor;
// 	}
// 
// 	public ValueDependentColor getValueDependentColor() {
// 		return valueDependentColor;
// 	}
// }


import java.text.NumberFormat;
import java.util.ArrayList;
import java.util.List;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Paint.Align;
import android.graphics.RectF;
import android.view.MotionEvent;
import android.view.ScaleGestureDetector;
import android.view.View;
import android.widget.LinearLayout;
import com.ezio.multiwii.graph.GraphViewSeries.GraphViewSeriesStyle;
		// rect
		paint.setARGB(180, 100, 100, 100);
		float legendHeight = (shapeSize+5)*graphSeries.size() +5;
		float lLeft = width-legendWidth - 10;
		float lTop;
		switch (legendAlign) {
		case TOP:
			lTop = 10;
			break;
		case MIDDLE:
			lTop = height/2 - legendHeight/2;
			break;
		default:
			lTop = height - GraphViewConfig.BORDER - legendHeight -10;
		}
		float lRight = lLeft+legendWidth;
		float lBottom = lTop+legendHeight;
		canvas.drawRoundRect(new RectF(lLeft, lTop, lRight, lBottom), 8, 8, paint);

		for (int i=0; i<graphSeries.size(); i++) {
			paint.setColor(graphSeries.get(i).style.color);
			canvas.drawRect(new RectF(lLeft+5, lTop+5+(i*(shapeSize+5)), lLeft+5+shapeSize, lTop+((i+1)*(shapeSize+5))), paint);
			if (graphSeries.get(i).description != null) {
				paint.setColor(Color.WHITE);
				paint.setTextAlign(Align.LEFT);
				canvas.drawText(graphSeries.get(i).description, lLeft+5+shapeSize+5, lTop+shapeSize+(i*(shapeSize+5)), paint);
			}
		}
	}

// Path: src/com/ezio/multiwii/graph/GraphViewSeries.java
// static public class GraphViewSeriesStyle {
// 	public int color = 0xff0077cc;
// 	public int thickness = 3;
// 	private ValueDependentColor valueDependentColor;
// 
// 	public GraphViewSeriesStyle() {
// 		super();
// 	}
// 
// 	public GraphViewSeriesStyle(int color, int thickness) {
// 		super();
// 		this.color = color;
// 		this.thickness = thickness;
// 	}
// 
// 	public void setValueDependentColor(ValueDependentColor valueDependentColor) {
// 		this.valueDependentColor = valueDependentColor;
// 	}
// 
// 	public ValueDependentColor getValueDependentColor() {
// 		return valueDependentColor;
// 	}
// }


// Path: src/com/ezio/multiwii/graph/GraphView.java
import java.text.NumberFormat;
import java.util.ArrayList;
import java.util.List;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Paint.Align;
import android.graphics.RectF;
import android.view.MotionEvent;
import android.view.ScaleGestureDetector;
import android.view.View;
import android.widget.LinearLayout;
import com.ezio.multiwii.graph.GraphViewSeries.GraphViewSeriesStyle;

		// rect
		paint.setARGB(180, 100, 100, 100);
		float legendHeight = (shapeSize+5)*graphSeries.size() +5;
		float lLeft = width-legendWidth - 10;
		float lTop;
		switch (legendAlign) {
		case TOP:
			lTop = 10;
			break;
		case MIDDLE:
			lTop = height/2 - legendHeight/2;
			break;
		default:
			lTop = height - GraphViewConfig.BORDER - legendHeight -10;
		}
		float lRight = lLeft+legendWidth;
		float lBottom = lTop+legendHeight;
		canvas.drawRoundRect(new RectF(lLeft, lTop, lRight, lBottom), 8, 8, paint);

		for (int i=0; i<graphSeries.size(); i++) {
			paint.setColor(graphSeries.get(i).style.color);
			canvas.drawRect(new RectF(lLeft+5, lTop+5+(i*(shapeSize+5)), lLeft+5+shapeSize, lTop+((i+1)*(shapeSize+5))), paint);
			if (graphSeries.get(i).description != null) {
				paint.setColor(Color.WHITE);
				paint.setTextAlign(Align.LEFT);
				canvas.drawText(graphSeries.get(i).description, lLeft+5+shapeSize+5, lTop+shapeSize+(i*(shapeSize+5)), paint);
			}
		}
	}

	abstract public void drawSeries(Canvas canvas, GraphViewData[] values, float graphwidth, float graphheight, float border, double minX, double minY, double diffX, double diffY, float horstart, GraphViewSeriesStyle style);