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.84k stars 658 forks source link

propsForLabels getting applied to labels on x axis and y axis both in Abstract Chart #383

Open msaqlain opened 4 years ago

msaqlain commented 4 years ago

The requirement is to show huge number of records in labels of x Axis. Due to the overlapping of labels, we have to rotate the label to show all the labels.

After using verticalLabelRotation prop with value 290 label got rotated but due to starting point of text is fixed the text move upwards.

image

Then we used propsForLabels, which reflected on both vertical and horizontal labels which is not required.

propsForLabels: {
                rotation: 315,
                translateX: -12,
                translateY: 10,
              },

Can we have two separate props to pass propsForVerticalLabels and propsForHorizontalLabels

I want to achieve this output.

image

msaqlain commented 4 years ago

Created a pull request for this feature. Very useable feature in my case.

https://github.com/indiespirit/react-native-chart-kit/pull/384