I'm wondering what's the most performant way of drawing real-time line chart with streaming data at very high frequency (new values every 15ms). I getting the data through BLE, and adding to array that I'ts never bigger then 500 items. I need to have ~10 different line charts from this data.
The whole situation is as follows:
* the data stream every 15ms
* i'm keeping it in redux store as array[500]
(removing first element when there is new and array.length >= 500
* got to show the data as 10 independent line charts
I'm using react-native-svg-charts
, works as expected but when there is 500 points and the first one is changing (as I'm removing it) the chart rerender itself and whole view gets laggy (~20fps).
I was wondering that using setNativeProps
(on <Path />
from react-native-svg
) will help in this scenerio, but I'm not sure is it the most performant way.
If you got better ideas and suggestions (like using react-native-art
) please let me know, I need to have ~60fps in this view.
Best