JesperLekland / react-native-svg-charts

📈 One library to rule all charts for React Native 📊
MIT License
2.35k stars 404 forks source link

graph is slow with 500+ data points #607

Open winning-solutions opened 10 months ago

winning-solutions commented 10 months ago

Hi! we are developing an app where user can weight themseves with t BLE sclane and than see the data in the chart. The chart is a line chart and the user can drag and swipe left-right to smooth scroll the graph.

But with more than 500 points the graph gets really slow and laggy. iOS also but Android is worse. The problem is when you try to horizontal scroll, than it really lags and also on first load. It seems like all those points will be renderes as one large SVG.

But have also users with 3000 points.

Does anyone has an idea how to fix it? Is there any option we can activate to improve it? Or is the graph not suitable for so much data? Not sure if we can lazy load the data.

Any help would be appreciated! The app is final and now we can't publish it because if this show stopper.

Thanks! Nico

lucaswitch commented 10 months ago

That's a limitation of the library, for fixing it slice the last 200~300 items and always plot the last data window. Make a slider on bottom of the chart to rotate the items windows. Or you can try another library, this library don't receive any updates since a while.