}
throw new IllegalArgumentException(message);
}
final IntervalXYDataset intervalDataset = (IntervalXYDataset) dataset;
final double value = intervalDataset.getYValue(series, item);
if (Double.isNaN(value)) {
return;
}
double positiveBase = 0.0;
double negativeBase = 0.0;
for (int i = 0; i < series; i++) {
final double v = dataset.getYValue(i, item);
if (!Double.isNaN(v)) {
if (v > 0) {
positiveBase = positiveBase + v;
} else {
negativeBase = negativeBase + v;
}
}
}
double translatedBase;
double translatedValue;
final RectangleEdge edgeR = plot.getRangeAxisEdge();
if (value > 0.0) {
translatedBase = rangeAxis.valueToJava2D(positiveBase, dataArea,
edgeR);
translatedValue = rangeAxis.valueToJava2D(positiveBase + value,
dataArea, edgeR);
} else {
translatedBase = rangeAxis.valueToJava2D(negativeBase, dataArea,
edgeR);
translatedValue = rangeAxis.valueToJava2D(negativeBase + value,
dataArea, edgeR);
}
final RectangleEdge edgeD = plot.getDomainAxisEdge();
final double startX = intervalDataset.getStartXValue(series, item);
if (Double.isNaN(startX)) {
return;
}
double translatedStartX = domainAxis.valueToJava2D(startX, dataArea,
edgeD);
final double endX = intervalDataset.getEndXValue(series, item);
if (Double.isNaN(endX)) {
return;
}
final double translatedEndX = domainAxis.valueToJava2D(endX, dataArea,
edgeD);