You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm creating little pie charts (only 35px radius) and when i have extreme values (eg [1000000, 10] ) the sector becomes too small to render and then the entire chart fails.
It renders incorrectly
doesn't create a label for the small item
I've tried poking around to see if it's possible to ensure a minimum render size, but I've not had much luck yet.
The text was updated successfully, but these errors were encountered:
Once again, I can see that this is intentional coding for some reason. Again, this goes against traditional graphing libraries where if you want to not include a value you don't include it in the data set, not have the graph automatically and silently drop values you intentionally included.
If anyone else finds this a problem (and it was a deal breaker for me), comment out the following lines and sectors won't be "cut"
for (i = 0; i < len; i++) {
if (defcut && values[i] * 360 / total <= 1.5) {
cut = i;
defcut = false;
}
if (i > cut) {
defcut = false;
values[cut].value += values[i];
values[cut].others = true;
others = values[cut].value;
}
}
len = Math.min(cut + 1, values.length);
I'm creating little pie charts (only 35px radius) and when i have extreme values (eg [1000000, 10] ) the sector becomes too small to render and then the entire chart fails.
I've tried poking around to see if it's possible to ensure a minimum render size, but I've not had much luck yet.
The text was updated successfully, but these errors were encountered: