[feature request]: radial bar chart
Is there any plan to add circular barplot to visx? https://www.d3-graph-gallery.com/circular_barplot
This isn't on our short list of features (I'm primarily focused on the @visx/xychart package) but we'd happily review the addition!
@visx/shape has LineRadial currently so this would fit well there.
Hi @williaster is this feature request up for grabs? If yes shall I work on this?
Hey @sarathps93 π it is open for grabs if you're interested! π
@williaster Thanks for the confirmation. I will start working on this
Hi @williaster After some initial analysis need some input from you.
The given circular bar plot can be easily constructed using the existing Arc component from visx-shapes. So should I create the circular bar plot as a separate component or just include it in the examples / gallery to let the users know how to construct it from the existing packages?
One more addition would be the inclusion of scaleRadial from d3-scales
Hey @sarathps93 thanks for digging into this more! π Seems like adding scaleRadial to @visx/scale is clear, my sense for just adding a demo using Arc vs a higher-level RadialBarChart is to start with the demo (this would be consistent with the approach for a cartesian Bar Chart).
Thinking about the primitives that might be needed for this, I was also reminded of #404 AxisRadial and #405 GridRadial/GridPolar which I started a long time ago and never wrapped up. That was pre-TypeScript so they'll need a bit of work to land. If you have any interest in either of those I could abandon the PRs in favor of newer ones.
Excited for this!
Thanks for the response @williaster . I will add scaleRadial and a demo for the new chart.
And regarding #404 & #405, does these PRs just lack the typescript support? If everything else is intact shall I re-use the existing code you had written in those?
Hey @sarathps93 I believe #404 + #405 were in pretty good shape except for TypeScript for the new functionality itself, and it used the old project name vx instead of visx.
Another thing that has changed significantly since then is the documentation in the demo package, it was static html at the time and the directory structure has also changed. The changes to the /lineradial demo should still be mostly applicable, tho the demo is now written in TypeScript and it was JavaScript at the time. Happy to clarify anything else if you end up wanting to work on that π
@williaster Sure, I can take those as well.
@williaster I will be adding the features incrementally to avoid a large single PR.