vasturiano / sunburst-chart

A sunburst interactive chart web component for visualizing hierarchical data
https://vasturiano.github.io/sunburst-chart/example/flare/
MIT License
292 stars 91 forks source link

Support fully managed integration with React. Willing to contribute. #117

Open coreymunn3 opened 5 months ago

coreymunn3 commented 5 months ago

Is your feature request related to a problem? Please describe. There seem to be alot of people having issues integrating this wonderful library with React components, see https://github.com/vasturiano/sunburst-chart/issues/85 and https://github.com/vasturiano/sunburst-chart/issues/100.

Describe the solution you'd like I think this library could be made better by enabling react users to import a wrapper component that makes the integration simpler. It's not too hard, and in fact I would be happy to contribute to this. Maybe this should be a different library altogether, though. Please inform if this already exists or has already been created somewhere, but I could not find many if any free React sunburst chart libraries, and no other react sunburst libraries by the same creator.

This is how we would use this new component.

import ReactSunburst from 'sunburst-chart'
<SunburstChart  {...props that can override stated defaults} /> 

and the rest would happen automagically so that the user can focus on just feeding it some data.

Describe alternatives you've considered I've created a custom implementation of this idea in a private repo

Additional context none, at the moment. can provide code sandbox to illustrate how this component would work, if requested. Otherwise I'll just keep using my own custom implementation.

vasturiano commented 5 months ago

@coreymunn3 thanks for reaching out and for your suggestion.

If there is demand I think it's a good idea to have a ready packaged React binding of this component. But it should be indeed a separate library.

It can also be implemented with minimal code using react-kapsule.

Feel free to go ahead and create such a wrapper in a separate module, no problem at all. 👍