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

Feature Request: Pie Charts Variable Inner Radius #6768

Open
barrymichaeldoyle opened this issue Nov 2, 2023 · 2 comments
Open

Feature Request: Pie Charts Variable Inner Radius #6768

barrymichaeldoyle opened this issue Nov 2, 2023 · 2 comments

Comments

@barrymichaeldoyle
Copy link

Screenshot 2023-11-02 at 14 10 01

It would be epic if there was a way to make a Pie Chart have slices with variable inner radii, currently the donut pie chart has the hole properties which will set the radii for every slice instead of individual slices.

@archmoj
Copy link
Contributor

archmoj commented Nov 2, 2023

If you are interested to submit a PR, then you need to add arrayOk: true, to hole attribute here:

hole: {
valType: 'number',
min: 0,
max: 1,
dflt: 0,
editType: 'calc',
description: [
'Sets the fraction of the radius to cut out of the pie.',
'Use this to make a donut chart.'
].join(' ')
},

Then inside pie/plot.js, you should revisit places .pole is used to read the value. E.g. you could see how this is handled for the pull attribute which is already arrayOk.

Please visit CONTRIBUTING.md for more information.

@barrymichaeldoyle
Copy link
Author

@archmoj thank you so much! I've pushed changes to the PR. I think I've covered all .hole scenarios. Hopefully correctly :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants