can you please post a basic example of using achart engine in android
3 Answers
I know this has been more than a year since the question was asked, but I'd like to try to help any others who have the same question and find this as I did.
I have managed to get the ChartDemo.java down to just a few lines and it completely skips the GeneratedChartDemo.java. The result calls just the SensorValuesChart(). This is what I was interested in but the call can be changed to any of the others, except the hard coded ones, that you would wish to try.
package org.achartengine.chartdemo.demo;
import org.achartengine.chartdemo.demo.chart.SensorValuesChart;
import android.app.ListActivity;
import android.content.Intent;
import android.os.Bundle;
public class ChartDemo extends ListActivity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
startActivity((new SensorValuesChart()).execute(this));
}
}

- 79,279
- 19
- 185
- 195

- 79
- 1
- 1
Did you at least try?
http://www.achartengine.org/content/goodies.html follow that guide. The zip referenced ( http://achartengine.googlecode.com/files/achartengine-0.6.0-demo-source.zip ) has a ton of source code. Googling also gets you some sample results.

- 3,412
- 3
- 20
- 24
-
8These are hardly basic, due to a quite complex nature of the demo app. Multiple classes calling each other to create views. – Piotrek Okoński Feb 26 '12 at 21:04
-
@piotrek - Nope, but that's the nature of achart engine in general. It's a messy library that I would avoid - Steema TeeChart is amazing. – Codemonkey Feb 27 '12 at 17:53
-
There are no sample results on Google. I think you have to just run the demo, choose the graph demo you like(there is a whole list), and then try to understand that code. I will post my sampled code once finished. – Radu Apr 19 '12 at 09:33
-
2The next best is another page on Stack Overflow: http://stackoverflow.com/questions/4062161/android-i-am-using-achartengine-library-for-graphs-but-not-able-to-integrate-a Pretty lame response, Klaus. Even looking at the AChartEngine's sample code, it's not easy to tell what's going on. – Eagle Jul 16 '12 at 22:05
Linking to this thread, which explains more about using AChartEngine with intents vs. with views directly.