Currently, for both PieChart2D and PieChart3D objects,
if the sum of your dataset = 0, a stack trace is printed
and a skewed rectangle is rendered (at least in the case
of the PieChart3D chart).
This fix is to address the divide by zero case which is
currently unhandled in:
PieChartDataProcessor.getPercentageOfPie( int index )
by adding the code:
if (this.sumOfData == 0) return 0.0;
It also modifies the PieChart2D and 3D classes to
check if the sumOfData = 0 and if so automatically
render the "slice" as a 360 degree arc with a fill color
equal to the chart background color to always clearly
indicate that the pie slice is empty.
Modified source files containing fixes