开发者

how to use achart engine in android [closed]

开发者 https://www.devze.com 2023-02-13 08:47 出处:网络
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical andcannot be reasonably answered in its current form. For help clari
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. 开发者_如何转开发 Closed 9 years ago.

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?

0

精彩评论

暂无评论...
验证码 换一张
取 消