Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more customizability to Pie radial label #1313

Closed
akvashi24 opened this issue Nov 30, 2020 · 1 comment
Closed

Add more customizability to Pie radial label #1313

akvashi24 opened this issue Nov 30, 2020 · 1 comment
Labels
🍰 pie @nivo/pie package

Comments

@akvashi24
Copy link

Is your feature request related to a problem? Please describe.
My main issue is that the radial label doesn't support onClick functionality

Describe the solution you'd like
Either a prop on Pie to allow onClick for radialLabel or extending the radialLabel prop to allow a completely custom label, similar to Radar

Describe alternatives you've considered
I have to be satisfied with clicking the slices on the pie, but it's not an alternative

Additional context
Happy to add an onClick function in a PR, but a completely custom radiallabel makes more sense to me

@plouc
Copy link
Owner

plouc commented Dec 18, 2020

We're gonna be able to pass an arcLabelsComponent to the pie chart to completely customize the behavior/look of it once #1350 gets merged, the pie package is gonna contain some BC breaks though, several props were renamed and transitions are now supported.

You can already play with it using this codesandbox (which can be forked if you wish to try using it with your own setup) and the default component is available here.
Please note that the component is gonna receive spring values, not regular values in order to support transitions, so react-spring animated components should be used in lieu of regular elements.

There's also a few other improvements like the ability to grow the arcs radius on hover.

@plouc plouc closed this as completed Dec 18, 2020
@plouc plouc added the 🍰 pie @nivo/pie package label Dec 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍰 pie @nivo/pie package
Projects
None yet
Development

No branches or pull requests

2 participants