can you please post a basic example of using achart engine in android
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));
}
}
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.
Linking to this thread, which explains more about using AChartEngine with intents vs. with views directly.
Android: I am using AChartEngine library for graphs, but not able to integrate achartengine's graph view with android xml?
精彩评论