visx icon indicating copy to clipboard operation
visx copied to clipboard

[feature request]: radial bar chart

Open alangrn opened this issue 5 years ago β€’ 10 comments

Is there any plan to add circular barplot to visx? https://www.d3-graph-gallery.com/circular_barplot

alangrn avatar Oct 01 '20 20:10 alangrn

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.

williaster avatar Oct 02 '20 21:10 williaster

Hi @williaster is this feature request up for grabs? If yes shall I work on this?

sarathps93 avatar Nov 08 '20 20:11 sarathps93

Hey @sarathps93 πŸ‘‹ it is open for grabs if you're interested! πŸ™

williaster avatar Nov 16 '20 19:11 williaster

@williaster Thanks for the confirmation. I will start working on this

sarathps93 avatar Nov 16 '20 19:11 sarathps93

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

sarathps93 avatar Nov 20 '20 16:11 sarathps93

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!

williaster avatar Nov 23 '20 20:11 williaster

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?

sarathps93 avatar Nov 24 '20 07:11 sarathps93

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 avatar Nov 25 '20 05:11 williaster

@williaster Sure, I can take those as well.

sarathps93 avatar Nov 26 '20 16:11 sarathps93

@williaster I will be adding the features incrementally to avoid a large single PR.

sarathps93 avatar Dec 04 '20 17:12 sarathps93