How to plot real time sensor values in Graph in android? - android

I want to plot the graph of sensors value in android app.
Which library will be perfect for this ?

There are a few different graphing libraries available for Android.
For my own app, I'm currently live-plotting sensor data using Android GraphView. It runs smoothly, and is quite customizable. The screenshots on the site look basic, but you can change it to fit your design.
I'm probably going to start using MPAndroidChart soon as well. It looks very good and is quite customizable, but I'm not sure if it supports live graphing like GraphView does.
Here's a list of other Android graphing libraries I found on Google: https://android-arsenal.com/tag/40
UPDATE: MPAndroidChart does support live graphing. I've moved to that, and would recommend it. It has good docs for newcomers.
UPDATE 2: MPAndroidChart does NOT support live graphing according to the official page:
MPAndroidChart is free software, as a result dynamic & realtime data is not officially supported.

Related

Android live rendering strip chart library

I am trying to find the best charting library for my android app that receives live data from a data acquisition device (supports up to 800 samples per sec). I need to display a live, moving strip chart with some additional features like zooming in and out and tracing back the chart. I have looked at a few open source libraries like achartengine , afreechart, graphView but can't really seem to decide which one I should go with due to lack of enough examples and information. Any helpful links? Any recommendation?
I would suggest you try AChartEngine for your project. See this for some tutorials.
There is also another related thread on this.

Best charting tool used in android for representing data of your app

In my app, I have the following information which I want to display in the form of a graph.
Weight of a person.
Body temperature.
Date.
Now in my case, I want weight and body temperature on the y-axis parallel to each other and Date on the x-axis. So can anyone tell me which is the best android graph tool to do this? If possible with an example.
Regards
Anshuman
I have done quiet a research on this.If you are looking for drawing pie,histograms, bar or line graphs with 3D look I beliver ther is not such library available.You can use aichart for some 2D charts.Or final solution is you can start using the google Chart APIS , they are very good but they all are in web view and you need to have internet available on the phone/emulator.
There is a google group for achartengine, lots of good code is floating around there you can join it.
But I am afraid you will not get the 3D charting anywhere else.
if you thought of using the Adobe Flex (using AIR 3.1 or higher) you may get tremendous fullfillment of the requirement you are having in your head.You may get tempted to use it at once,but teh programming is in AS(Action Script)
have a look at the linked video, you will get teh idea of what I am talking about, but sadly you have to code in Action Script and not in Andorid PL.

Display stock performance in android

Could anyone please advise me what would be the best way to display the performance of a particular stock in an android app. I would be interested to know if any one has used any particular libraries.
I use a yahoo finance CSV parser to fetch the stock info.
Thanks.
I don't know of any good libraries specifically dealing with stock information, but I am assuming you are interested in charting? There are a bunch of options for producing charts for Android apps:
Graphview - A custom View for creating graphs in Android
Flot - A jQuery library for creating graphs. There are one or two good tutorials for Android.
AChartEngine - Another charting library for Android
aiCharts seems pretty polished, and has a free financial demo app you can download from the market, but you need to buy a license to use it. Also at the time I am writing this, their website (www.artfulbits.com) is down.

Candlestick charts component for android

I was looking for a candlestick lib chart solution for android, and couldnt find one for a couple of months now.
Im looking for a smooth scrolling, zomming, tooltip, option to polt in a new candle without the need to render the entire chart.
i did come across all the normal options for native code charting:
DriodCharts, AchartEngine, ChartDroid, none of which support candlesticks.
I also used 5 free Javascript and html solutions, all of which are very very slow, and most dont support adding a data tick after the chart has been plotted.
I have seen many free android applications with decent charts and have tried contacting the developers hoping they can at least point me to somewhere, or even sell their lib.
My question is does anyone here know of a native solution for candlesticks in android that supports what i mentioned?
Thanks,
Totem
I've the same problem as you. There is no library in android which directly support candlestick chart. There is no straightforward native solution for your ploblem but if requirement is to particular chart I sugest you to look after Google Chart API
There's no another way including open source solutions. If you want you can check this out CandleStick plot by ArtfulBits.
--EDITED--
Lately I wrote simple article how to draw CandleStick Chart in android with small help Google Chart API.
SciChart for Android supports candlestick charts, and brings an extremely fast, real-time charting control to the Android platform.
SciChart is a commercial control but available under royalty free distribution / per developer licensing. There is also free licensing available for educational use with some conditions.
Some useful links can be found below:
Android Candlestick Chart Example
SciChart's Android Charts Features
Android Chart Performance Tests vs. Open Source & Commercial
Disclosure: I am the MD of SciChart just so you know!
Not a free-of-charge product but you might be interested to see the TeeChart for Android Beta.
It includes a Candle Series and support for other financial series and indicators.
Also you can have a look at NChart3D. It is commercial, but comes with a full set of financial chart types.

How do I plot a STOCK historical graph in android app?

I wanted to plot a stock historical graph based on google finance in my android app .
The problem is I can't find the api for just the stock chart alone and I must try to find another ways to do it.
I thought of a way but don't know what whether it works
the steps are as follows..
1) get the details from csv file
2) read the csv file
3) plot the graph using the information of the csv file.(WHICH I DON'T KNOW HOW TO DO IT)!
so if my steps above works , I would only want to know how to plot the graph.
Use Charting Libraries like JFreeCharts, JOpenChart (google for more)
They include samples on how to use them...
Or You could use Google's Charting API's
Neither JFreeCharts nor JOpenChart has not been ported to Android (as far as I know) and will not work on an android as-is, not will any other awt/swing based api due to differences in their respective Canvases etc. You could try porting one yourself but its not as trivial as it sounds and you probably won't be happy with the results.
I suggest using a library written from the ground up for Android which has support for the kind of plot you need. I recommend AndroidPlot but there are others out there as well.

Categories

Resources