Issue
I really like how neat react-native-chart-kit is, however I am having a problem with how it display the data.
it use the lowest point in your data as the as the bottom and the highest as the top. There is an option to start from zero, but what if I wanted to start from 5? the same for the top, what If I wanted to display a range of 5to 90?
I was wondering if someone knew more about this graph or have used something else that can do these things?
Thanks
Solution
Add extra datasets with one value each (the min and max value you want to show)
<LineChart
data={{
datasets: [
{
data: [3, 4, 5, 6, 7] // dataset
},
{
data: [1] // min
},
{
data: [10] // max
},
],
}}
/>
Answered By - user15696556
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.