It looks like negative values are dropped when constructing pie charts, probably to prevent negative sums (example). I think this is the line responsible for this behavior, and that it could be fixed by checking for negative values in the sums rather than checking the individual points.