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

PieChartDataSet no slice space shown when an entry has 0 value #1730

Closed
AshTag92 opened this issue Oct 27, 2016 · 5 comments
Closed

PieChartDataSet no slice space shown when an entry has 0 value #1730

AshTag92 opened this issue Oct 27, 2016 · 5 comments
Labels

Comments

@AshTag92
Copy link

AshTag92 commented Oct 27, 2016

Hi,

I noticed something while using this awesome library!
Im using the pie chart and sometimes when I'm showing some data one of the entries will have a 0 value. I also have a set slice space as I quite like the look of it however when an entry as a 0 value the pie chart then ends up looking this:
screen shot 2016-10-27 at 10 10 41

However if all the entries do have a value above 0 it ends up showing the desired slice space:
screen shot 2016-10-27 at 10 10 46

Am I missing something? Or is this intended? If so is there a way to still display a slice space when an entry has an empty value?

I know I could not add the entry to the data set but then I want to make sure the colour is set specifically for each segment. However when the number of entries changes the colour chosen for a segment is different. I can't seem to understand how it decides which pie chart segment gets which colour from the colours array.

Thanks again for any answers :)

@pmairoldi
Copy link
Collaborator

pmairoldi commented Oct 27, 2016

Sounds like a bug to me

@pmairoldi pmairoldi added the bug label Oct 27, 2016
@danielgindi
Copy link
Collaborator

Actually it's a feature that removes spacing when it won't fit or would cause weird looks. 0 value will cause double spacing with no value (which you specifically might want...), and an overly crowded pie with 30 values may have no space for slice spacing.

We need to make this an opt-in feature in my opinion, and default to false. Let the user decide and have more control.

@AshTag92
Copy link
Author

I see yeah the reasoning behind it makes sense.

I agree making it an opt-in feature would be great.

@danielgindi
Copy link
Collaborator

(Actually, actual 0 values will not generate extra slice spacing, as they are being ignored for rendering. But it's possible to have almost-invisible values which generate slice spacing)

@danielgindi
Copy link
Collaborator

Done

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

No branches or pull requests

3 participants