peity
peity copied to clipboard
Values of 0 not created in pie graph. Feature?
I have perhaps a slightly unusual use case. I have dynamically created data where some options will be 0. My assumption has been that using nth-child in CSS to cycle through elements to change the fill would result in the same colours for both bar and pie graphs to allow the use of a visual key.
However, I have noticed that any 0 values are not generated in the pie version, so the colours do not match.
As a workaround I am pushing in a figure of 0.0001 instead, but wanted to flag this up in case you felt this was not desired behaviour.
I'll look into it.
Thanks. Really enjoying the leanless of this library by the way.
Ditto, trying to render doughnuts with values like 0,5,0 does not render the middle value, but it does render stuff like 3,0,0 or 0,0,8, just not middle values.
I have another strange behavour with initial value 0, please look at this: http://jsfiddle.net/obywd0up/1/ If you startup a chart with initial value of 0, then you cannot use fraction (1/2) anymore. Therefore you can use csv values (1,2).