- Line Charts
- Bar Charts
Tested on Android 1.6, 2.2, 2.3 and 3.0 (honeycomb, tablet).
- Two types: Line and Bar
- Custom labels The labels for the x- and y-axis are generated automatically. But you can set your only labels, Strings are possible.
- Background Optionally draws a light background under the diagramm stroke.
- Handle incomplete data It's possible to give the data in different frequency.
- Viewport You can limit the viewport so that only a part of the data will be displayed.
- Scrolling You can scroll with a finger touch move gesture.
- Scaling / Zooming Since Android 2.3! With two-fingers touch scale gesture, the viewport can be changed.
// line graph with dynamically genereated horizontal and vertical labels
LineGraphView graphView = new LineGraphView(
this // context
, new GraphViewData[] {
new GraphViewData(1, 2.0d)
, new GraphViewData(2, 1.5d)
, new GraphViewData(2.5, 3.0d) // another frequency
, new GraphViewData(3, 2.5d)
, new GraphViewData(4, 1.0d)
, new GraphViewData(5, 3.0d)
} // data
, "GraphViewDemo" // heading
, null // dynamic labels
, null // dynamic labels
);
LinearLayout layout = (LinearLayout) findViewById(R.id.graph1);
layout.addView(graphView);
To show you how to integrate the library into an existing project see the GraphView-Demos project!
See GraphView-Demos for examples.
https://github.com/jjoe64/GraphView-Demoshttp://www.jjoe64.com/2011/07/chart-and-graph-library-for-android.html

