18

Is there a good way of dynamically displaying graphs in an Android application. Is there a tool for it?

Assim
  • 441
  • 2
  • 6
  • 18

3 Answers3

20

There are many opinions to do graphing. If you want static graphing you can use these API's/code samples.

So many others to choose from but most are static and non of these can handle real time data plots, i.e. ECG wave forms. One example you might want to look at is the Tricorder android example. Problem it is really complex to setup and if you just want the graphs, there is so much code to rip out. It can be done but I even noticed there is a lag the longer you run the program.

So far the only way I have found a real good dynamic graphing, is to do it yourself and use the SurfaceView and then draw usin the path.lineTo() see below for previous SO answer for this solution.

SO example

Community
  • 1
  • 1
JPM
  • 9,077
  • 13
  • 78
  • 137
  • thanks..I tried SOEg. but data overlapping on each other..instead to move further...any suggestion? – CoDe Dec 09 '13 at 10:39
  • See these http://stackoverflow.com/a/8579577/346309 http://stackoverflow.com/q/7235326/346309 I do have some source code that might help but the best way is the SO example if you are doing dynamic plotting. – JPM Dec 09 '13 at 17:12
  • Minor correction: Androidplot has always supported plotting realtime data. See the OrientationSensorExample in the [Androidplot demo app](https://play.google.com/store/apps/details?id=com.androidplot.demos&hl=en) on the Play Store if you want to see it live on your device. – Nick Jan 30 '16 at 05:45
  • Do you see then this was written? 5 years ago, androidplot was in its childhood and still does not handle the amount of data say a heart monitor uses that I was coding for. Data points at 256 per sec the graphing of androidplot died on the vine with this. I eventually came up with my own graphing system. But yes statically yours is great dynamically its still a little weak. – JPM Feb 01 '16 at 22:23
  • 1
    It seems that 3 years later - only https://github.com/PhilJay/MPAndroidChart is available. All alternatives described here are no longer maintained. – elcuco Mar 15 '16 at 09:35
  • Actually andriodplot still is maintained but now its at https://bitbucket.org/androidplot/androidplot/ last commit was jan 2016 – JPM Mar 16 '16 at 19:10
1

Try GraphView https://www.youtube.com/watch?v=lokgFp9h85o I used these video series on GraphView to plot real time graph from data coming from adruino .

Rishi Gupta
  • 133
  • 9
0

I use the library MPAndroidChart (https://github.com/PhilJay/MPAndroidChart), is the best library for this kind of things in Android.

Gustavo Cantero
  • 440
  • 6
  • 9