jondot / awesome-react-native

Awesome React Native components, news, tools, and learning material!

Home Page:http://www.awesome-react-native.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Any real-time graphs in react-native?

bitabs opened this issue · comments

I'm quite surprised that react-native doesn't have a stable library for charts. It's the fundamental tool for data visualization. I'm currently getting data from a server, which needs to be visualized in a line graph. Is this possible at the moment? Can anyone please direct me to any charting library you have come across in react native.

commented

@NaseebullahSafi try this

@naseebullahsafi I can really recommend this react-native-svg-charts 😊 https://github.com/JesperLekland/react-native-svg-charts

victory is what is used too.

victory is what is used too.

@pvinis Victory is not for any animation. I tried example with just several columns for bar chart and it gets freezing - now there is a lot of bugs in victory-native and very slow performance. It's animation is pure JS.

@NaseebullahSafi What did you end up using for your need? I need to have a live line chart that receives data in real time. I just need to display the last 10th seconds, old data should not be displayed. Thanks in advance.

Hello, @NaseebullahSafi @omatrot and @likern . I figured out the solution to this case senario lately, so i wanted to share that here for anyone who maybe into real-time data plots in react-native. You guys can use, react-native-chart-kit library. It will render your data in real-time. In the example code you will replace Math.random() function with your own data values, and that all :) One thing worth mentiong here is that you would reduce your data to 2 or 3 decimal points before passing it to data prop. As it doesn't take very length floats for some reason.

Cheers.