/** * Returns the range of values in the domain (x-values) of a dataset. * * @param dataset the dataset (<code>null</code> not permitted). * * @return The range of values (possibly <code>null</code>). */ public static Range findDomainBounds(XYDataset dataset) { return findDomainBounds(dataset, true); }
/** * Returns the range required by this renderer to display all the domain * values in the specified dataset. * * @param dataset the dataset (<code>null</code> permitted). * * @return The range, or <code>null</code> if the dataset is * <code>null</code>. */ public Range findDomainBounds(XYDataset dataset) { if (dataset != null) { return DatasetUtilities.findDomainBounds(dataset, true); } else { return null; } }
/** * Returns the lower and upper bounds (range) of the x-values in the * specified dataset. Since this renderer uses the x-interval in the * dataset, this is taken into account for the range. * * @param dataset the dataset (<code>null</code> permitted). * * @return The range (<code>null</code> if the dataset is * <code>null</code> or empty). */ public Range findDomainBounds(XYDataset dataset) { if (dataset != null) { return DatasetUtilities.findDomainBounds(dataset, true); } else { return null; } }
return DatasetUtilities.findDomainBounds(dataset, visibleSeriesKeys, includeInterval); return DatasetUtilities.findDomainBounds(dataset, includeInterval);
/** * Returns the lower and upper bounds (range) of the x-values in the * specified dataset. * * @param dataset the dataset (<code>null</code> permitted). * * @return The range (<code>null</code> if the dataset is <code>null</code> * or empty). */ public Range findDomainBounds(XYDataset dataset) { if (dataset != null) { Range r = DatasetUtilities.findDomainBounds(dataset, false); double offset = 0; // TODO getSeriesShape(n).getBounds().width / 2; return new Range(r.getLowerBound() + offset, r.getUpperBound() + offset); } else { return null; } }
/** * Returns the range for an axis. * * @param axis the axis. * * @return The range for an axis. */ public Range getDataRange(ValueAxis axis) { if (this.dataset == null) { return null; } Range result = null; if (axis == getDomainAxis()) { result = DatasetUtilities.findDomainBounds(this.dataset); } else if (axis == getRangeAxis()) { result = DatasetUtilities.findRangeBounds(this.dataset); } return result; }
/** * Returns the lower and upper bounds (range) of the x-values in the * specified dataset. * * @param dataset the dataset (<code>null</code> permitted). * * @return The range (<code>null</code> if the dataset is <code>null</code> * or empty). * * @see #findRangeBounds(XYDataset) */ public Range findDomainBounds(XYDataset dataset) { if (dataset != null) { Range r = DatasetUtilities.findDomainBounds(dataset, false); if (r == null) { return null; } else { return new Range(r.getLowerBound() + this.xOffset, r.getUpperBound() + this.blockWidth + this.xOffset); } } else { return null; } }
DatasetUtilities.findDomainBounds(d));
/** * Returns the range of the values in the dataset's domain, including * or excluding the interval around each x-value as specified. * * @param includeInterval a flag that determines whether or not the * x-interval should be taken into account. * * @return The range. */ public Range getDomainBounds(boolean includeInterval) { // first get the range without the interval, then expand it for the // interval width Range range = DatasetUtilities.findDomainBounds(this.dataset, false); if (includeInterval && range != null) { double lowerAdj = getIntervalWidth() * getIntervalPositionFactor(); double upperAdj = getIntervalWidth() - lowerAdj; range = new Range(range.getLowerBound() - lowerAdj, range.getUpperBound() + upperAdj); } return range; }