Search in sources :

Example 1 with CategoryRangeInfo

use of org.jfree.data.category.CategoryRangeInfo in project SIMVA-SoS by SESoS.

the class DatasetUtilities method findRangeBounds.

/**
 * 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).
 *
 * @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;
}
Also used : Range(org.jfree.data.Range) CategoryRangeInfo(org.jfree.data.category.CategoryRangeInfo)

Aggregations

Range (org.jfree.data.Range)1 CategoryRangeInfo (org.jfree.data.category.CategoryRangeInfo)1