Graph for android
I need a library for graph that works like this:
int[] a = 开发者_如何学JAVA{1, 2, 3}
graph.show(a)
Does it exist?
you can refer open source java library for drawing graphs and charts.. achartengine
There was a pretty thorough question on something similar to this a while back, has my response in it too: https://stackoverflow.com/questions/5156740/im-looking-for-fancy-charts-library-for-android/5157576#5157576
aiCharts is very easy to work with if you are looking for simplicity. Just gotta get it installed and running, then the source code is pretty simple.
This chart library using js & HTML5
http://codecanyon.net/item/html5-chart/166221?ref=mhameen
you can use it in a web browser view
Use GraphView http://www.jjoe64.com/p/graphview-library.html
That's very easy to use and powerful anyway.
Code for a simple chart with 4 points:
// init example series data
GraphViewSeries exampleSeries = new GraphViewSeries(new GraphViewData[] {
new GraphViewData(1, 2.0d)
, new GraphViewData(2, 1.5d)
, new GraphViewData(3, 2.5d)
, new GraphViewData(4, 1.0d)
});
GraphView graphView = new LineGraphView(
this // context
, "GraphViewDemo" // heading
);
graphView.addSeries(exampleSeries); // data
LinearLayout layout = (LinearLayout) findViewById(R.id.layout);
layout.addView(graphView);
you can use RGraph library from below link: http://www.rgraph.net/download#stable
I used this library in project and I think its best and easy to use for all types of graphs like line, rect, bars, pie, etc. with some special animation effects!!
精彩评论