int rowCount = dataset.getRowCount();
int columnCount = dataset.getColumnCount();
if (includeInterval && dataset instanceof IntervalCategoryDataset) {
// handle the special case where the dataset has y-intervals that
// we want to measure
IntervalCategoryDataset icd = (IntervalCategoryDataset) dataset;
Number value, lvalue, uvalue;
for (int row = 0; row < rowCount; row++) {
for (int column = 0; column < columnCount; column++) {
value = icd.getValue(row, column);
double v;
if ((value != null)
&& !Double.isNaN(v = value.doubleValue())) {
minimum = Math.min(v, minimum);
maximum = Math.max(v, maximum);
}
lvalue = icd.getStartValue(row, column);
if (lvalue != null
&& !Double.isNaN(v = lvalue.doubleValue())) {
minimum = Math.min(v, minimum);
maximum = Math.max(v, maximum);
}
uvalue = icd.getEndValue(row, column);
if (uvalue != null
&& !Double.isNaN(v = uvalue.doubleValue())) {
minimum = Math.min(v, minimum);
maximum = Math.max(v, maximum);
}