I need to draw Pie Chart (Dynamic Values).How to create the Chart without using 3rd party API.
Below shows simple pie-chart and you have to extend for more features...values[] and colors array should be equal....
public class Demo extends Activity {
/** Called when the activity is first created. */
float values[]={300,400,100,500};
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
LinearLayout linear=(LinearLayout) findViewById(R.id.linear);
values=calculateData(values);
linear.addView(new MyGraphview(this,values));
}
private float[] calculateData(float[] data) {
// TODO Auto-generated method stub
float total=0;
for(int i=0;i