indiespirit / react-native-chart-kit

📊React Native Chart Kit: Line Chart, Bezier Line Chart, Progress Ring, Bar chart, Pie chart, Contribution graph (heatmap)
https://expo.io/@indiespirit/react-native-chart-kit
MIT License
2.8k stars 653 forks source link

Is there a way to have less than 4 values on the Y axis? #697

Open theinventor27 opened 11 months ago

theinventor27 commented 11 months ago

My graph takes in data that is either 1 or 0 and because the y axis has 4 values it comes up at 0, 1, 1, 1 on the y axis. Is there a way to make it only have 0 and 1? I have the issue any time the max value of the chart is less than 4.

Screen Shot 2023-07-31 at 5 48 44 PM Screen Shot 2023-07-31 at 5 48 56 PM

NoamKu95 commented 2 months ago

You have the "segments" property. The default is 4 and therefore you see the 0 lines + 4 y labels