简体   繁体   中英

Statistics curve on android app

I'm trying to make an app where I can show some statistics.

I have some data that I collect from an STM microcontroller each 5 minutes, and with those data, i want to be able to draw a curve with this data, something like this :

https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcQ56Bh-zxV5SZ0OYfaO0sLlxYCuZG0PbDtRR95opMtU80SPDx2r

So, what element in android can allow me to do so and how should i process the data i have ? I thought about using canvas, and making point then drawing the curve using those points, is that a valid method ?

And thanks

find some components to try in the Graphics section https://android-arsenal.com/free

william chart looks really cool!

You can implement your own CustomView, which allows you to draw, like in a canvas. You can draw lines, curves and charts , but you must implement it manually, by extending and overriding View class method. But it isn't hard. The abilities of the CustomView is wide, you can even use it for simple games. So check this tutorial , if you want to know more.

But if you haven't time for it, you can use libraries, that do all work for you, just like this .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM