HumbleSoftware/Flotr2 — Issue #56: Pie Chart - Empty Slice
Author: cesutherland
Created: 2012-03-05 15:20:45+00:00
State: open

Issue:

> Hi. We probably found some bugs:
>
> https://github.com/HumbleSoftware/Flotr2/blob/master/flotr2.js
>
> 4559: // TODO wtf is this for?
> 4560: if (startAngle == endAngle) return;
>
> With it pie chart will be broken, if last data was [0,0].
>
> For example:
> graph = Flotr.draw(container, [
> { data : [0, 20], label : 'Male' },
> { data : [0, 80], label : 'Unknown'},
> { data: [0,0], label: 'Female'}], // <---
> ...
>
> But if it not last, all ok.
>
> And because of it on 4649 slice (this.slices[index]) will be undefined.
>
> We commented 4560 line and pie worked ok.
>