react-native-gifted-charts
react-native-gifted-charts copied to clipboard
Independent Value Ranges for Positive and Negative Regions to Prevent Distortions
Hello, I believe the value ranges in the positive and negative regions of the chart should be independent of each other; otherwise, distortions occur. To explain this with a few examples:
For example, in this data, the values increase by 8, 8 and decrease by 8, 8. However, I want the values in the negative part of the chart to decrease by a different amount.
So, I want the chart to have 5 sections in the positive area and 2 sections in the negative area. I set the noOfSections prop to 5 and the noOfSectionsBelowXAxis prop to 2, but this causes my chart to look distorted.
For this reason, I believe the interval values in the positive and negative areas should be independent of each other.
My example :
<BarChart height={160} activeOpacity={0.9} focusBarOnPress={true} data={[ { label: 'AAA', value: 30 }, { label: 'BBB', value: 20 }, { label: 'CCC', value: 10 }, { label: 'DDD', value: -90 }, ]} adjustToWidth={true} noOfSections={5} noOfSectionsBelowXAxis={2} autoShiftLabels />
Screenshot