* @return The range (or <code>null</code> if the dataset is <code>null</code> or empty).
*/
public Range getRangeExtent(XYDataset dataset) {
double min = Double.POSITIVE_INFINITY;
double max = Double.NEGATIVE_INFINITY;
TableXYDataset d = (TableXYDataset) dataset;
int itemCount = d.getItemCount();
for (int i = 0; i < itemCount; i++) {
double[] stackValues = getStackValues(dataset, d.getSeriesCount(), i);
min = Math.min(min, stackValues[0]);
max = Math.max(max, stackValues[1]);
}
return new Range(min, max);
}