Auto-adjusting Y-Axis Range #919
Unanswered
tsailingw-myndsens
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I used react-native-gifted-charts to create an auto-scrolling chart based on continuous values input from a wearable device similar to fitbit (via bluetooth) that measures, for example, oxygen readings, etc.
Depending on the user state, the values for one chart can range from, for example, within the 40's to within the 15's, in the decimals range.
Previously, on Kotlin, I used this library for charting -- https://github.com/jjoe64/GraphView, and the y-axis auto-adjusts based on the input values. As you can see, the y-axis has decimal precision. It also adjusts automatically when the values jumps from 15.5-16.0 to 40.0-40.5, so the data changes are visible as spikes in the charts.
However, for react-native-gifted-charts, the y-axis seems to be fixed. When I try to make customizations, the chart changes in size from 100px to, for example, 500px (to accommodate the large data range). If I fixed the chart height, then the chart is a constant scrolling straight line (because the data change is often in the decimals)
How do I do the same for LineChart?
Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions