Logo Icon Logo
A Crowd-sourced Cookbook on Writing Great Android® Apps
GitHub logo Twitter logo OReilly Book Cover Art

Graphing with a Charting Package

Author: Ian Darwin -- Published? true -- FormatLanguage: W

Problem:

You need charts or graphs, but don't want to write a lot of code.

Solution:

Use a charting package.

Discussion:

There are two sets of charting packages that can be used.

The first are "pure Java" or at least "pure Android" packages, written in Java (maybe with GL graphics and/or in C++); these are probably the simplest. An example of this appears in 862 Orientation Changes : From ListView data values to Landscape Charting.

The second set are the graphing packages using HTML5 graphics, in which you'd use a "hybrid app" with a WebView containing the HTML5 Canvas view. Examples of this technique is in 4426 Exchanging Array Data between Java and JavaScript, and 851 Android HTML5 RGraph Charting.

A third, low-budget approach is to use Google Charts in a Webview; only useful if you have guaranteed connectivity and don't mind shipping your raw data up to Google to have them format it into a chart for you.

The following tables summarize first the Java-based packages and secondly the HTML5 packages.

Java Solutions
Java/Code-based Charting Packages
Name URL Remarks
AChartEngine http://code.google.com/p/achartengine/
afreechart http://code.google.com/p/afreechart/
AndroidPlot http://androidplot.com/
ChartDroid http://code.google.com/p/chartdroid/ Intent-based; usable from multiple apps
DroidCharts http://code.google.com/p/droidcharts/ Used in 862
GraphView http://android.arnodenhond.com/components/graphview Forked at https://github.com/jjoe64/GraphView
HTML5 Solutions
HTML5-based Charting Packages
Name URL Remarks
RGraph http://www.rgraph.net/
More Needed! - -
No records found.