peity icon indicating copy to clipboard operation
peity copied to clipboard

Values of 0 not created in pie graph. Feature?

Open MattyBalaam opened this issue 9 years ago • 4 comments

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.

MattyBalaam avatar Mar 12 '15 15:03 MattyBalaam

I'll look into it.

benpickles avatar Mar 12 '15 21:03 benpickles

Thanks. Really enjoying the leanless of this library by the way.

MattyBalaam avatar Mar 19 '15 10:03 MattyBalaam

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.

webmutation avatar May 04 '15 21:05 webmutation

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).

tobiascapin avatar Oct 04 '16 12:10 tobiascapin