nihgwu / react-native-pie

Pie chart for React Native
MIT License
107 stars 25 forks source link

Adding sections prop, removing series and colors props #27

Closed zgordon01 closed 4 years ago

zgordon01 commented 4 years ago

Description

It didn't make much sense to have colors and series in their own separate arrays, when in reality they are tied to the same logical entity (both work together). I have clubbed them together in a single sections object. My argument is this makes the Pie more readable and easier to use.

Other Details

PropTypes were changed to reflect the new structure. Changed the readme and examples Bumped package version to a major because this is a breaking change.

zgordon01 commented 4 years ago

@nihgwu Let me know what you think!

nihgwu commented 4 years ago

@zgordon01 Thanks for your contribution, I love the idea

zgordon01 commented 4 years ago

it's out of scope, but it would great if you could help to verify if this workaround could be removed 86adf51, which is mentioned here

This could be included in a separate PR as it's out of scope

zgordon01 commented 4 years ago

Addressing https://github.com/nihgwu/react-native-pie/issues/25

nihgwu commented 4 years ago

@zgordon01 OK, that's go with this for now, I asked your help on removing the workaround because I don't use React Native for years so I can't do it myself, BTW, if you are willing, I can add you as the maintainer of this package

zgordon01 commented 4 years ago

@zgordon01 OK, that's go with this for now, I asked your help on removing the workaround because I don't use React Native for years so I can't do it myself, BTW, if you are willing, I can add you as the maintainer of this package

When I get time I can look into the workaround you mentioned. Also I would love being a maintainer of the package, in addition to @milindagrawal. We are currently both working on integrating this into our app and you might see some more PRs from us.