double positiveBase = 0.0;
double negativeBase = 0.0;
if (dataset instanceof GroupToBarBaseCalculator) {
final GroupToBarBaseCalculator calc = (GroupToBarBaseCalculator) dataset;
positiveBase = calc.getPositiveBaseByGroup(row, column);
negativeBase = calc.getNegativeBaseByGroup(row, column);
} else { // perform dumb n^2 calculation
for (int i = 0; i < row; i++) {
if (group.equals(this.seriesToGroupMap.getGroup(dataset
.getRowKey(i)))) {