// we do not modify the created dataset if this is not the function
// computation run. (FunctionLevel '0')
return;
}
final DefaultPieDataset localPieDataset = pieDataset;
if (!isSummaryOnly())
{
final Object seriesObject = getDataRow().get(getSeriesColumn());
final Comparable seriesComparable;
if (seriesObject instanceof Comparable)
{
seriesComparable = (Comparable) seriesObject;
}
else
{
// ok, we need some better error management here. Its a
// prototype :)
seriesComparable = "PIESETCOLL.USER_ERROR_CATEGORY_NOT_COMPARABLE"; //$NON-NLS-1$
}
final Object valueObject = getDataRow().get(getValueColumn());
Number value = (valueObject instanceof Number) ? (Number) valueObject : null;
Object isThere = null;
try
{
isThere = localPieDataset.getValue(seriesComparable);
}
catch (Exception ignored)
{
}
if (isThere != null)
{
final double val = (value != null) ? value.doubleValue() : 0;
value = new Double(val + ((Number) isThere).doubleValue());
}
localPieDataset.setValue(seriesComparable, value);
}
}