double dValue = 0;
if (value != null) {
dValue = ((Number) value).doubleValue();
}
PieSectorInfo sector = new PieSectorInfoImpl();
sector.setKey(comparable);
sector.setValue(value);
sector.setSeriesTotal(total);
sector.setIndex(index);
sector.setSeries(new SeriesInfoImpl());
sector.getSeries().setIndex(dsIndex);
double p = (dValue / total);
DecimalFormat nf1 = new DecimalFormat("#.00%");
String proportionalPercent = nf1.format(p);
sector.setProportionalValue(proportionalPercent);
return sector;
}