Bar chart set label rotation
Can we pass rotation option too? I don't want my x labels to have rotation.
https://github.com/capitalone/react-native-pathjs-charts/blob/master/src/Bar.js#L137
Happy to make a PR.
any news related to this issue?
I agree, a configurable rotation option would be nice. Submitting a PR would be the fastest way to get that enhancement added @superandrew213 - I'm willing to review it quickly if you're willing to submit it.
+1
https://github.com/capitalone/react-native-pathjs-charts/pull/144 done
To the lib authors, please don't make these kinds of assumptions baked into a library, aka rotate.
@fxfactorial As a project maintainer, I completely agree and we will do our best to avoid this in the future but I want to mention a couple of things.
First, configuration options need some kind of reasonable default value. I think you and I can agree that in this particular case, 0 is perhaps a more suitable default value for rotation than 45 but its entirely reasonable for someone to think 45 is also a reasonable default. Either way, what you are objecting to is a lack of configurability rather than the fact that there is an assumption made on what the rotation value should be.
Second, this project is by and large a port of another react-based library, react-pathjs-chart. Now, in that library, the author chose to make 45 the default rotation value, so when this library was ported over to this react-native-targeted library, that default value was kept (I am not the original author of this port but either he saw this and decided to keep the default as is or missed it entirely when doing the port). So, it's understandable how we got to where we are now.