Example usage for org.jfree.data.category CategoryRangeInfo getRangeBounds

List of usage examples for org.jfree.data.category CategoryRangeInfo getRangeBounds

Introduction

In this page you can find the example usage for org.jfree.data.category CategoryRangeInfo getRangeBounds.

Prototype

public Range getRangeBounds(List visibleSeriesKeys, boolean includeInterval);

Source Link

Document

Returns the range of the values in this dataset's range.

Usage

From source file:org.jfree.data.general.DatasetUtils.java

/**
 * Finds the bounds of the y-values in the specified dataset, including
 * only those series that are listed in visibleSeriesKeys.
 *
 * @param dataset  the dataset ({@code null} not permitted).
 * @param visibleSeriesKeys  the keys for the visible series
 *     ({@code null} not permitted)./*from   w w  w .  ja va 2  s . c  o  m*/
 * @param includeInterval  include the y-interval (if the dataset has a
 *     y-interval).
 *
 * @return The data bounds.
 *
 * @since 1.0.13
 */
public static Range findRangeBounds(CategoryDataset dataset, List visibleSeriesKeys, boolean includeInterval) {
    Args.nullNotPermitted(dataset, "dataset");
    Range result;
    if (dataset instanceof CategoryRangeInfo) {
        CategoryRangeInfo info = (CategoryRangeInfo) dataset;
        result = info.getRangeBounds(visibleSeriesKeys, includeInterval);
    } else {
        result = iterateToFindRangeBounds(dataset, visibleSeriesKeys, includeInterval);
    }
    return result;
}

From source file:org.jfree.data.general.DatasetUtilities.java

/**
 * Finds the bounds of the y-values in the specified dataset, including
 * only those series that are listed in visibleSeriesKeys.
 *
 * @param dataset  the dataset (<code>null</code> not permitted).
 * @param visibleSeriesKeys  the keys for the visible series
 *     (<code>null</code> not permitted).
 * @param includeInterval  include the y-interval (if the dataset has a
 *     y-interval).//ww  w . j a v a2  s .c o m
 *
 * @return The data bounds.
 *
 * @since 1.0.13
 */
public static Range findRangeBounds(CategoryDataset dataset, List visibleSeriesKeys, boolean includeInterval) {
    ParamChecks.nullNotPermitted(dataset, "dataset");
    Range result;
    if (dataset instanceof CategoryRangeInfo) {
        CategoryRangeInfo info = (CategoryRangeInfo) dataset;
        result = info.getRangeBounds(visibleSeriesKeys, includeInterval);
    } else {
        result = iterateToFindRangeBounds(dataset, visibleSeriesKeys, includeInterval);
    }
    return result;
}