visibleSeriesKeys.add(dataset.getSeriesKey(s));
}
}
// the bounds should be calculated using just the items within
// the current range of the x-axis...if there is one
Range xRange = null;
XYPlot p = getPlot();
if (p != null)
{
ValueAxis xAxis = null;
int index = p.getIndexOf(this);
if (index >= 0)
{
xAxis = this.plot.getDomainAxisForDataset(index);
}
if (xAxis != null)
{
xRange = xAxis.getRange();
}
}
if (xRange == null)
{
xRange = new Range(Double.NEGATIVE_INFINITY,
Double.POSITIVE_INFINITY);
}
return DatasetUtilities.findRangeBounds(dataset,
visibleSeriesKeys, xRange, includeInterval);
}