GraphView - open source graph plotting
library for Android

GraphView is a library for Android to programmatically create
flexible and nice-looking diagrams.
It is easy to understand, to integrate and to customize.
Create Line Graphs, Bar Graphs, Point Graphs
or implement your own custom types.

Star GraphView on GitHub

 XML Layout file:

<com.jjoe64.graphview.GraphView
        android:layout_width="match_parent"
        android:layout_height="200dip"
        android:id="@+id/graph" />

Java code: 

GraphView graph = (GraphView) findViewById(R.id.graph);
LineGraphSeries<DataPoint> series = new LineGraphSeries<>(new DataPoint[] {
          new DataPoint(0, 1),
          new DataPoint(1, 5),
          new DataPoint(2, 3)
});
graph.addSeries(series);
 

Key features

  • Different plotting types
    Line Chart, Bar Chart and Points Chart
    and they can be plotted together as a combinationlearn more
  • Draw multiple series of data
    Let the diagram show more that one series in a graph. You can set a color and a description for every series. learn more
  • Realtime / Live Chart
    Append new data live or reset the whole data. learn more
  • Tap Listener
    Handle tap events on specific data points. learn more
  • Show legend
    A legend can be displayed inline the chart. You can set the width and the vertical align (top, middle, bottom). learn more
  • Custom label formatter
    The labels for the x- and y-axis are generated automatically. But you can set your own labels, Strings are possible. learn more
  • 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. learn more
  • Scrolling and Scaling / Zooming
    You can scroll with a finger touch move gesture.
    With two-fingers touch scale gesture (Multi-touch), the viewport can be changed. learn more
  • XML Integration learn more
  • Optional Axis Titles
    Set vertical and horizontal axis titles. learn more
  • Many Styles
    change the color and thickness, label font size/color and more learn more
  • Very customizable
    There are many hooks to use in order to do custom rendering or changing the paint objects.  learn more

I wanted first to thank you for your awesome library! I've tried 4-5 of them but only GraphView could display multiple graphs consistently, with dates on the X axis. Great stuff.

-- leanweb.fr

its awesome. I love it. So easy to customize and integrate into my app , and gives my users great visuals.

-- Michael V.

Hi Jonas firstly I'd like to express my gratitude for the awesome GraphViews library you have made for Android it's been a lifesaver

-- Mubanga M.

congratulations for your Work with GraphView it's an awesome library

-- Zaren O.

Hello Jonas! I'm using your android graphView library and it's great!

-- Stavros B.

Your project is great! Really enjoy using it.

-- Anton V.

I want to thank you for building such an easy to use tool

-- Daniel C.