org.jfree.data.general

## Class DatasetUtilities

- java.lang.Object
- - org.jfree.data.general.DatasetUtilities

    public final class DatasetUtilities
    extends java.lang.Object

A collection of useful static methods relating to datasets.

### Method Summary

Methods
`static double` `calculatePieDatasetTotal(PieDataset dataset)` Calculates the total of all the values in a `PieDataset`.
`static double` `calculateStackTotal(TableXYDataset dataset, int item)` Calculates the total for the y-values in all series for a given item index.
`static CategoryDataset` `createCategoryDataset(java.lang.Comparable[] rowKeys, java.lang.Comparable[] columnKeys, double[][] data)` Creates a `CategoryDataset` that contains a copy of the data in an array (instances of `Double` are created to represent the data items).
`static CategoryDataset` `createCategoryDataset(java.lang.Comparable rowKey, KeyedValues rowData)` Creates a `CategoryDataset` by copying the data from the supplied `KeyedValues` instance.
`static CategoryDataset` `createCategoryDataset(java.lang.String rowKeyPrefix, java.lang.String columnKeyPrefix, double[][] data)` Creates a `CategoryDataset` that contains a copy of the data in an array (instances of `Double` are created to represent the data items).
`static CategoryDataset` `createCategoryDataset(java.lang.String rowKeyPrefix, java.lang.String columnKeyPrefix, java.lang.Number[][] data)` Creates a `CategoryDataset` that contains a copy of the data in an array.
`static PieDataset` `createConsolidatedPieDataset(PieDataset source, java.lang.Comparable key, double minimumPercent)` Creates a new pie dataset based on the supplied dataset, but modified by aggregating all the low value items (those whose value is lower than the `percentThreshold`) into a single item with the key "Other".
`static PieDataset` `createConsolidatedPieDataset(PieDataset source, java.lang.Comparable key, double minimumPercent, int minItems)` Creates a new pie dataset based on the supplied dataset, but modified by aggregating all the low value items (those whose value is lower than the `percentThreshold`) into a single item.
`static PieDataset` `createPieDatasetForColumn(CategoryDataset dataset, java.lang.Comparable columnKey)` Creates a pie dataset from a table dataset by taking all the values for a single column.
`static PieDataset` `createPieDatasetForColumn(CategoryDataset dataset, int column)` Creates a pie dataset from a `CategoryDataset` by taking all the values for a single column.
`static PieDataset` `createPieDatasetForRow(CategoryDataset dataset, java.lang.Comparable rowKey)` Creates a pie dataset from a table dataset by taking all the values for a single row.
`static PieDataset` `createPieDatasetForRow(CategoryDataset dataset, int row)` Creates a pie dataset from a table dataset by taking all the values for a single row.
`static Range` `findCumulativeRangeBounds(CategoryDataset dataset)` Calculates the range of values for a dataset where each item is the running total of the items for the current series.
`static Range` `findDomainBounds(XYDataset dataset)` Returns the range of values in the domain (x-values) of a dataset.
`static Range` `findDomainBounds(XYDataset dataset, boolean includeInterval)` Returns the range of values in the domain (x-values) of a dataset.
`static Range` `findDomainBounds(XYDataset dataset, java.util.List visibleSeriesKeys, boolean includeInterval)` Returns the bounds of the x-values in the specified `dataset` taking into account only the visible series and including any x-interval if requested.
`static java.lang.Number` `findMaximumDomainValue(XYDataset dataset)` Returns the maximum domain value for the specified dataset.
`static java.lang.Number` `findMaximumRangeValue(CategoryDataset dataset)` Returns the maximum range value for the specified dataset.
`static java.lang.Number` `findMaximumRangeValue(XYDataset dataset)` Returns the maximum range value for the specified dataset.
`static java.lang.Number` `findMaximumStackedRangeValue(CategoryDataset dataset)` Returns the maximum value in the dataset range, assuming that values in each category are "stacked".
`static java.lang.Number` `findMinimumDomainValue(XYDataset dataset)` Finds the minimum domain (or X) value for the specified dataset.
`static java.lang.Number` `findMinimumRangeValue(CategoryDataset dataset)` Returns the minimum range value for the specified dataset.
`static java.lang.Number` `findMinimumRangeValue(XYDataset dataset)` Returns the minimum range value for the specified dataset.
`static java.lang.Number` `findMinimumStackedRangeValue(CategoryDataset dataset)` Returns the minimum value in the dataset range, assuming that values in each category are "stacked".
`static Range` `findRangeBounds(CategoryDataset dataset)` Returns the range of values in the range for the dataset.
`static Range` `findRangeBounds(CategoryDataset dataset, boolean includeInterval)` Returns the range of values in the range for the dataset.
`static Range` `findRangeBounds(CategoryDataset dataset, java.util.List visibleSeriesKeys, boolean includeInterval)` Finds the bounds of the y-values in the specified dataset, including only those series that are listed in visibleSeriesKeys.
`static Range` `findRangeBounds(XYDataset dataset)` Returns the range of values in the range for the dataset.
`static Range` `findRangeBounds(XYDataset dataset, boolean includeInterval)` Returns the range of values in the range for the dataset.
`static Range` `findRangeBounds(XYDataset dataset, java.util.List visibleSeriesKeys, Range xRange, boolean includeInterval)` Finds the bounds of the y-values in the specified dataset, including only those series that are listed in visibleSeriesKeys, and those items whose x-values fall within the specified range.
`static Range` `findStackedRangeBounds(CategoryDataset dataset)` Returns the minimum and maximum values for the dataset's range (y-values), assuming that the series in one category are stacked.
`static Range` `findStackedRangeBounds(CategoryDataset dataset, double base)` Returns the minimum and maximum values for the dataset's range (y-values), assuming that the series in one category are stacked.
`static Range` `findStackedRangeBounds(CategoryDataset dataset, KeyToGroupMap map)` Returns the minimum and maximum values for the dataset's range (y-values), assuming that the series in one category are stacked.
`static Range` `findStackedRangeBounds(TableXYDataset dataset)` Returns the minimum and maximum values for the dataset's range, assuming that the series are stacked.
`static Range` `findStackedRangeBounds(TableXYDataset dataset, double base)` Returns the minimum and maximum values for the dataset's range, assuming that the series are stacked, using the specified base value.
`static Range` `findZBounds(XYZDataset dataset)` Returns the range of values in the z-dimension for the dataset.
`static Range` `findZBounds(XYZDataset dataset, boolean includeInterval)` Returns the range of values in the z-dimension for the dataset.
`static Range` `findZBounds(XYZDataset dataset, java.util.List visibleSeriesKeys, Range xRange, boolean includeInterval)` Finds the bounds of the z-values in the specified dataset, including only those series that are listed in visibleSeriesKeys, and those items whose x-values fall within the specified range.
`static boolean` `isEmptyOrNull(CategoryDataset dataset)` Returns `true` if the dataset is empty (or `null`), and `false` otherwise.
`static boolean` `isEmptyOrNull(PieDataset dataset)` Returns `true` if the dataset is empty (or `null`), and `false` otherwise.
`static boolean` `isEmptyOrNull(XYDataset dataset)` Returns `true` if the dataset is empty (or `null`), and `false` otherwise.
`static Range` `iterateCategoryRangeBounds(CategoryDataset dataset, boolean includeInterval)` Deprecated. As of 1.0.10, use `iterateRangeBounds(CategoryDataset, boolean)`.
`static Range` `iterateDomainBounds(XYDataset dataset)` Iterates over the items in an `XYDataset` to find the range of x-values.
`static Range` `iterateDomainBounds(XYDataset dataset, boolean includeInterval)` Iterates over the items in an `XYDataset` to find the range of x-values.
`static Range` `iterateRangeBounds(CategoryDataset dataset)` Iterates over the data item of the category dataset to find the range bounds.
`static Range` `iterateRangeBounds(CategoryDataset dataset, boolean includeInterval)` Iterates over the data item of the category dataset to find the range bounds.
`static Range` `iterateRangeBounds(XYDataset dataset)` Iterates over the data item of the xy dataset to find the range bounds.
`static Range` `iterateRangeBounds(XYDataset dataset, boolean includeInterval)` Iterates over the data items of the xy dataset to find the range bounds.
`static Range` `iterateToFindDomainBounds(XYDataset dataset, java.util.List visibleSeriesKeys, boolean includeInterval)` Returns the range of x-values in the specified dataset for the data items belonging to the visible series.
`static Range` `iterateToFindRangeBounds(CategoryDataset dataset, java.util.List visibleSeriesKeys, boolean includeInterval)` Iterates over the data item of the category dataset to find the range bounds.
`static Range` `iterateToFindRangeBounds(XYDataset dataset, java.util.List visibleSeriesKeys, Range xRange, boolean includeInterval)` Returns the range of y-values in the specified dataset for the data items belonging to the visible series and with x-values in the given range.
`static Range` `iterateToFindZBounds(XYZDataset dataset, java.util.List visibleSeriesKeys, Range xRange, boolean includeInterval)` Returns the range of z-values in the specified dataset for the data items belonging to the visible series and with x-values in the given range.
`static Range` `iterateXYRangeBounds(XYDataset dataset)` Deprecated. As of 1.0.10, use `iterateRangeBounds(XYDataset)`.
`static Range` `iterateZBounds(XYZDataset dataset)` Iterates over the data item of the xyz dataset to find the z-dimension bounds.
`static Range` `iterateZBounds(XYZDataset dataset, boolean includeInterval)` Iterates over the data items of the xyz dataset to find the z-dimension bounds.
`static XYDataset` `sampleFunction2D(Function2D f, double start, double end, int samples, java.lang.Comparable seriesKey)` Creates an `XYDataset` by sampling the specified function over a fixed range.
`static XYSeries` `sampleFunction2DToSeries(Function2D f, double start, double end, int samples, java.lang.Comparable seriesKey)` Creates an `XYSeries` by sampling the specified function over a fixed range.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Method Detail

#### calculatePieDatasetTotal

    public static double calculatePieDatasetTotal(PieDataset dataset)

Calculates the total of all the values in a `PieDataset`. If the dataset contains negative or `null` values, they are ignored.

Parameters:
  `dataset` - the dataset (`null` not permitted).
Returns:
  The total.

#### createPieDatasetForRow

    public static PieDataset createPieDatasetForRow(CategoryDataset dataset,
                                    java.lang.Comparable rowKey)

Creates a pie dataset from a table dataset by taking all the values for a single row.

Parameters:
  `dataset` - the dataset (`null` not permitted).
  `rowKey` - the row key.
Returns:
  A pie dataset.

#### createPieDatasetForRow

    public static PieDataset createPieDatasetForRow(CategoryDataset dataset,
                                    int row)

Creates a pie dataset from a table dataset by taking all the values for a single row.

Parameters:
  `dataset` - the dataset (`null` not permitted).
  `row` - the row (zero-based index).
Returns:
  A pie dataset.

#### createPieDatasetForColumn

    public static PieDataset createPieDatasetForColumn(CategoryDataset dataset,
                                       java.lang.Comparable columnKey)

Creates a pie dataset from a table dataset by taking all the values for a single column.

Parameters:
  `dataset` - the dataset (`null` not permitted).
  `columnKey` - the column key.
Returns:
  A pie dataset.

#### createPieDatasetForColumn

    public static PieDataset createPieDatasetForColumn(CategoryDataset dataset,
                                       int column)

Creates a pie dataset from a `CategoryDataset` by taking all the values for a single column.

Parameters:
  `dataset` - the dataset (`null` not permitted).
  `column` - the column (zero-based index).
Returns:
  A pie dataset.

#### createConsolidatedPieDataset

    public static PieDataset createConsolidatedPieDataset(PieDataset source,
                                          java.lang.Comparable key,
                                          double minimumPercent)

Creates a new pie dataset based on the supplied dataset, but modified by aggregating all the low value items (those whose value is lower than the `percentThreshold`) into a single item with the key "Other".

Parameters:
  `source` - the source dataset (`null` not permitted).
  `key` - a new key for the aggregated items (`null` not permitted).
  `minimumPercent` - the percent threshold.
Returns:
  The pie dataset with (possibly) aggregated items.

#### createConsolidatedPieDataset

    public static PieDataset createConsolidatedPieDataset(PieDataset source,
                                          java.lang.Comparable key,
                                          double minimumPercent,
                                          int minItems)

Creates a new pie dataset based on the supplied dataset, but modified by aggregating all the low value items (those whose value is lower than the `percentThreshold`) into a single item. The aggregated items are assigned the specified key. Aggregation only occurs if there are at least `minItems` items to aggregate.

Parameters:
  `source` - the source dataset (`null` not permitted).
  `key` - the key to represent the aggregated items.
  `minimumPercent` - the percent threshold (ten percent is 0.10).
  `minItems` - only aggregate low values if there are at least this many.
Returns:
  The pie dataset with (possibly) aggregated items.

#### createCategoryDataset

    public static CategoryDataset createCategoryDataset(java.lang.String rowKeyPrefix,
                                        java.lang.String columnKeyPrefix,
                                        double[][] data)

Creates a `CategoryDataset` that contains a copy of the data in an array (instances of `Double` are created to represent the data items).

Row and column keys are created by appending 0, 1, 2, ... to the supplied prefixes.

Parameters:
  `rowKeyPrefix` - the row key prefix.
  `columnKeyPrefix` - the column key prefix.
  `data` - the data.
Returns:
  The dataset.

#### createCategoryDataset

    public static CategoryDataset createCategoryDataset(java.lang.String rowKeyPrefix,
                                        java.lang.String columnKeyPrefix,
                                        java.lang.Number[][] data)

Creates a `CategoryDataset` that contains a copy of the data in an array.

Row and column keys are created by appending 0, 1, 2, ... to the supplied prefixes.

Parameters:
  `rowKeyPrefix` - the row key prefix.
  `columnKeyPrefix` - the column key prefix.
  `data` - the data.
Returns:
  The dataset.

#### createCategoryDataset

    public static CategoryDataset createCategoryDataset(java.lang.Comparable[] rowKeys,
                                        java.lang.Comparable[] columnKeys,
                                        double[][] data)

Creates a `CategoryDataset` that contains a copy of the data in an array (instances of `Double` are created to represent the data items).

Row and column keys are taken from the supplied arrays.

Parameters:
  `rowKeys` - the row keys (`null` not permitted).
  `columnKeys` - the column keys (`null` not permitted).
  `data` - the data.
Returns:
  The dataset.

#### createCategoryDataset

    public static CategoryDataset createCategoryDataset(java.lang.Comparable rowKey,
                                        KeyedValues rowData)

Creates a `CategoryDataset` by copying the data from the supplied `KeyedValues` instance.

Parameters:
  `rowKey` - the row key (`null` not permitted).
  `rowData` - the row data (`null` not permitted).
Returns:
  A dataset.

#### sampleFunction2D

    public static XYDataset sampleFunction2D(Function2D f,
                             double start,
                             double end,
                             int samples,
                             java.lang.Comparable seriesKey)

Creates an `XYDataset` by sampling the specified function over a fixed range.

Parameters:
  `f` - the function (`null` not permitted).
  `start` - the start value for the range.
  `end` - the end value for the range.
  `samples` - the number of sample points (must be > 1).
  `seriesKey` - the key to give the resulting series (`null` not permitted).
Returns:
  A dataset.

#### sampleFunction2DToSeries

    public static XYSeries sampleFunction2DToSeries(Function2D f,
                                    double start,
                                    double end,
                                    int samples,
                                    java.lang.Comparable seriesKey)

Creates an `XYSeries` by sampling the specified function over a fixed range.

Parameters:
  `f` - the function (`null` not permitted).
  `start` - the start value for the range.
  `end` - the end value for the range.
  `samples` - the number of sample points (must be > 1).
  `seriesKey` - the key to give the resulting series (`null` not permitted).
Returns:
  A series.
Since:
  1.0.13

#### isEmptyOrNull

    public static boolean isEmptyOrNull(PieDataset dataset)

Returns `true` if the dataset is empty (or `null`), and `false` otherwise.

Parameters:
  `dataset` - the dataset (`null` permitted).
Returns:
  A boolean.

#### isEmptyOrNull

    public static boolean isEmptyOrNull(CategoryDataset dataset)

Returns `true` if the dataset is empty (or `null`), and `false` otherwise.

Parameters:
  `dataset` - the dataset (`null` permitted).
Returns:
  A boolean.

#### isEmptyOrNull

    public static boolean isEmptyOrNull(XYDataset dataset)

Returns `true` if the dataset is empty (or `null`), and `false` otherwise.

Parameters:
  `dataset` - the dataset (`null` permitted).
Returns:
  A boolean.

#### findDomainBounds

    public static Range findDomainBounds(XYDataset dataset)

Returns the range of values in the domain (x-values) of a dataset.

Parameters:
  `dataset` - the dataset (`null` not permitted).
Returns:
  The range of values (possibly `null`).

#### findDomainBounds

    public static Range findDomainBounds(XYDataset dataset,
                         boolean includeInterval)

Returns the range of values in the domain (x-values) of a dataset.

Parameters:
  `dataset` - the dataset (`null` not permitted).
  `includeInterval` - determines whether or not the x-interval is taken into account (only applies if the dataset is an `IntervalXYDataset`).
Returns:
  The range of values (possibly `null`).

#### findDomainBounds

    public static Range findDomainBounds(XYDataset dataset,
                         java.util.List visibleSeriesKeys,
                         boolean includeInterval)

Returns the bounds of the x-values in the specified `dataset` taking into account only the visible series and including any x-interval if requested.

Parameters:
  `dataset` - the dataset (`null` not permitted).
  `visibleSeriesKeys` - the visible series keys (`null` not permitted).
  `includeInterval` - include the x-interval (if any)?
Returns:
  The bounds (or `null` if the dataset contains no values.
Since:
  1.0.13

#### iterateDomainBounds

    public static Range iterateDomainBounds(XYDataset dataset)

Iterates over the items in an `XYDataset` to find the range of x-values. If the dataset is an instance of `IntervalXYDataset`, the starting and ending x-values will be used for the bounds calculation.

Parameters:
  `dataset` - the dataset (`null` not permitted).
Returns:
  The range (possibly `null`).

#### iterateDomainBounds

    public static Range iterateDomainBounds(XYDataset dataset,
                            boolean includeInterval)

Iterates over the items in an `XYDataset` to find the range of x-values.

Parameters:
  `dataset` - the dataset (`null` not permitted).
  `includeInterval` - a flag that determines, for an `IntervalXYDataset`, whether the x-interval or just the x-value is used to determine the overall range.
Returns:
  The range (possibly `null`).

#### findRangeBounds

    public static Range findRangeBounds(CategoryDataset dataset)

Returns the range of values in the range for the dataset.

Parameters:
  `dataset` - the dataset (`null` not permitted).
Returns:
  The range (possibly `null`).

#### findRangeBounds

    public static Range findRangeBounds(CategoryDataset dataset,
                        boolean includeInterval)

Returns the range of values in the range for the dataset.

Parameters:
  `dataset` - the dataset (`null` not permitted).
  `includeInterval` - a flag that determines whether or not the y-interval is taken into account.
Returns:
  The range (possibly `null`).

#### findRangeBounds

    public static Range findRangeBounds(CategoryDataset dataset,
                        java.util.List visibleSeriesKeys,
                        boolean includeInterval)

Finds the bounds of the y-values in the specified dataset, including only those series that are listed in visibleSeriesKeys.

Parameters:
  `dataset` - the dataset (`null` not permitted).
  `visibleSeriesKeys` - the keys for the visible series (`null` not permitted).
  `includeInterval` - include the y-interval (if the dataset has a y-interval).
Returns:
  The data bounds.
Since:
  1.0.13

#### findRangeBounds

    public static Range findRangeBounds(XYDataset dataset)

Returns the range of values in the range for the dataset. This method is the partner for the `findDomainBounds(XYDataset)` method.

Parameters:
  `dataset` - the dataset (`null` not permitted).
Returns:
  The range (possibly `null`).

#### findRangeBounds

    public static Range findRangeBounds(XYDataset dataset,
                        boolean includeInterval)

Returns the range of values in the range for the dataset. This method is the partner for the `findDomainBounds(XYDataset, boolean)` method.

Parameters:
  `dataset` - the dataset (`null` not permitted).
  `includeInterval` - a flag that determines whether or not the y-interval is taken into account.
Returns:
  The range (possibly `null`).

#### findRangeBounds

    public static Range findRangeBounds(XYDataset dataset,
                        java.util.List visibleSeriesKeys,
                        Range xRange,
                        boolean includeInterval)

Finds the bounds of the y-values in the specified dataset, including only those series that are listed in visibleSeriesKeys, and those items whose x-values fall within the specified range.

Parameters:
  `dataset` - the dataset (`null` not permitted).
  `visibleSeriesKeys` - the keys for the visible series (`null` not permitted).
  `xRange` - the x-range (`null` not permitted).
  `includeInterval` - include the y-interval (if the dataset has a y-interval).
Returns:
  The data bounds.
Since:
  1.0.13

#### iterateCategoryRangeBounds

    public static Range iterateCategoryRangeBounds(CategoryDataset dataset,
                                   boolean includeInterval)

Deprecated. As of 1.0.10, use `iterateRangeBounds(CategoryDataset, boolean)`.
Iterates over the data item of the category dataset to find the range bounds.

Parameters:
  `dataset` - the dataset (`null` not permitted).
  `includeInterval` - a flag that determines whether or not the y-interval is taken into account.
Returns:
  The range (possibly `null`).

#### iterateRangeBounds

    public static Range iterateRangeBounds(CategoryDataset dataset)

Iterates over the data item of the category dataset to find the range bounds.

Parameters:
  `dataset` - the dataset (`null` not permitted).
Returns:
  The range (possibly `null`).
Since:
  1.0.10

#### iterateRangeBounds

    public static Range iterateRangeBounds(CategoryDataset dataset,
                           boolean includeInterval)

Iterates over the data item of the category dataset to find the range bounds.

Parameters:
  `dataset` - the dataset (`null` not permitted).
  `includeInterval` - a flag that determines whether or not the y-interval is taken into account.
Returns:
  The range (possibly `null`).
Since:
  1.0.10

#### iterateToFindRangeBounds

    public static Range iterateToFindRangeBounds(CategoryDataset dataset,
                                 java.util.List visibleSeriesKeys,
                                 boolean includeInterval)

Iterates over the data item of the category dataset to find the range bounds.

Parameters:
  `dataset` - the dataset (`null` not permitted).
  `includeInterval` - a flag that determines whether or not the y-interval is taken into account.
  `visibleSeriesKeys` - the visible series keys.
Returns:
  The range (possibly `null`).
Since:
  1.0.13

#### iterateXYRangeBounds

    public static Range iterateXYRangeBounds(XYDataset dataset)

Deprecated. As of 1.0.10, use `iterateRangeBounds(XYDataset)`.
Iterates over the data item of the xy dataset to find the range bounds.

Parameters:
  `dataset` - the dataset (`null` not permitted).
Returns:
  The range (possibly `null`).

#### iterateRangeBounds

    public static Range iterateRangeBounds(XYDataset dataset)

Iterates over the data item of the xy dataset to find the range bounds.

Parameters:
  `dataset` - the dataset (`null` not permitted).
Returns:
  The range (possibly `null`).
Since:
  1.0.10

#### iterateRangeBounds

    public static Range iterateRangeBounds(XYDataset dataset,
                           boolean includeInterval)

Iterates over the data items of the xy dataset to find the range bounds.

Parameters:
  `dataset` - the dataset (`null` not permitted).
  `includeInterval` - a flag that determines, for an `IntervalXYDataset`, whether the y-interval or just the y-value is used to determine the overall range.
Returns:
  The range (possibly `null`).
Since:
  1.0.10

#### findZBounds

    public static Range findZBounds(XYZDataset dataset)

Returns the range of values in the z-dimension for the dataset. This method is the partner for the `findRangeBounds(XYDataset)` and `findDomainBounds(XYDataset)` methods.

Parameters:
  `dataset` - the dataset (`null` not permitted).
Returns:
  The range (possibly `null`).

#### findZBounds

    public static Range findZBounds(XYZDataset dataset,
                    boolean includeInterval)

Returns the range of values in the z-dimension for the dataset. This method is the partner for the `findRangeBounds(XYDataset, boolean)` and `findDomainBounds(XYDataset, boolean)` methods.

Parameters:
  `dataset` - the dataset (`null` not permitted).
  `includeInterval` - a flag that determines whether or not the z-interval is taken into account.
Returns:
  The range (possibly `null`).

#### findZBounds

    public static Range findZBounds(XYZDataset dataset,
                    java.util.List visibleSeriesKeys,
                    Range xRange,
                    boolean includeInterval)

Finds the bounds of the z-values in the specified dataset, including only those series that are listed in visibleSeriesKeys, and those items whose x-values fall within the specified range.

Parameters:
  `dataset` - the dataset (`null` not permitted).
  `visibleSeriesKeys` - the keys for the visible series (`null` not permitted).
  `xRange` - the x-range (`null` not permitted).
  `includeInterval` - include the z-interval (if the dataset has a z-interval).
Returns:
  The data bounds.

#### iterateZBounds

    public static Range iterateZBounds(XYZDataset dataset)

Iterates over the data item of the xyz dataset to find the z-dimension bounds.

Parameters:
  `dataset` - the dataset (`null` not permitted).
Returns:
  The range (possibly `null`).

#### iterateZBounds

    public static Range iterateZBounds(XYZDataset dataset,
                       boolean includeInterval)

Iterates over the data items of the xyz dataset to find the z-dimension bounds.

Parameters:
  `dataset` - the dataset (`null` not permitted).
  `includeInterval` - include the z-interval (if the dataset has a z-interval.
Returns:
  The range (possibly `null`).

#### iterateToFindDomainBounds

    public static Range iterateToFindDomainBounds(XYDataset dataset,
                                  java.util.List visibleSeriesKeys,
                                  boolean includeInterval)

Returns the range of x-values in the specified dataset for the data items belonging to the visible series.

Parameters:
  `dataset` - the dataset (`null` not permitted).
  `visibleSeriesKeys` - the visible series keys (`null` not permitted).
  `includeInterval` - a flag that determines whether or not the y-interval for the dataset is included (this only applies if the dataset is an instance of IntervalXYDataset).
Returns:
  The x-range (possibly `null`).
Since:
  1.0.13

#### iterateToFindRangeBounds

    public static Range iterateToFindRangeBounds(XYDataset dataset,
                                 java.util.List visibleSeriesKeys,
                                 Range xRange,
                                 boolean includeInterval)

Returns the range of y-values in the specified dataset for the data items belonging to the visible series and with x-values in the given range.

Parameters:
  `dataset` - the dataset (`null` not permitted).
  `visibleSeriesKeys` - the visible series keys (`null` not permitted).
  `xRange` - the x-range (`null` not permitted).
  `includeInterval` - a flag that determines whether or not the y-interval for the dataset is included (this only applies if the dataset is an instance of IntervalXYDataset).
Returns:
  The y-range (possibly `null`).
Since:
  1.0.13

#### iterateToFindZBounds

    public static Range iterateToFindZBounds(XYZDataset dataset,
                             java.util.List visibleSeriesKeys,
                             Range xRange,
                             boolean includeInterval)

Returns the range of z-values in the specified dataset for the data items belonging to the visible series and with x-values in the given range.

Parameters:
  `dataset` - the dataset (`null` not permitted).
  `visibleSeriesKeys` - the visible series keys (`null` not permitted).
  `xRange` - the x-range (`null` not permitted).
  `includeInterval` - a flag that determines whether or not the z-interval for the dataset is included (this only applies if the dataset has an interval, which is currently not supported).
Returns:
  The y-range (possibly `null`).

#### findMinimumDomainValue

    public static java.lang.Number findMinimumDomainValue(XYDataset dataset)

Finds the minimum domain (or X) value for the specified dataset. This is easy if the dataset implements the `DomainInfo` interface (a good idea if there is an efficient way to determine the minimum value). Otherwise, it involves iterating over the entire data-set.

Returns `null` if all the data values in the dataset are `null`.

Parameters:
  `dataset` - the dataset (`null` not permitted).
Returns:
  The minimum value (possibly `null`).

#### findMaximumDomainValue

    public static java.lang.Number findMaximumDomainValue(XYDataset dataset)

Returns the maximum domain value for the specified dataset. This is easy if the dataset implements the `DomainInfo` interface (a good idea if there is an efficient way to determine the maximum value). Otherwise, it involves iterating over the entire data-set. Returns `null` if all the data values in the dataset are `null`.

Parameters:
  `dataset` - the dataset (`null` not permitted).
Returns:
  The maximum value (possibly `null`).

#### findMinimumRangeValue

    public static java.lang.Number findMinimumRangeValue(CategoryDataset dataset)

Returns the minimum range value for the specified dataset. This is easy if the dataset implements the `RangeInfo` interface (a good idea if there is an efficient way to determine the minimum value). Otherwise, it involves iterating over the entire data-set. Returns `null` if all the data values in the dataset are `null`.

Parameters:
  `dataset` - the dataset (`null` not permitted).
Returns:
  The minimum value (possibly `null`).

#### findMinimumRangeValue

    public static java.lang.Number findMinimumRangeValue(XYDataset dataset)

Returns the minimum range value for the specified dataset. This is easy if the dataset implements the `RangeInfo` interface (a good idea if there is an efficient way to determine the minimum value). Otherwise, it involves iterating over the entire data-set. Returns `null` if all the data values in the dataset are `null`.

Parameters:
  `dataset` - the dataset (`null` not permitted).
Returns:
  The minimum value (possibly `null`).

#### findMaximumRangeValue

    public static java.lang.Number findMaximumRangeValue(CategoryDataset dataset)

Returns the maximum range value for the specified dataset. This is easy if the dataset implements the `RangeInfo` interface (a good idea if there is an efficient way to determine the maximum value). Otherwise, it involves iterating over the entire data-set. Returns `null` if all the data values are `null`.

Parameters:
  `dataset` - the dataset (`null` not permitted).
Returns:
  The maximum value (possibly `null`).

#### findMaximumRangeValue

    public static java.lang.Number findMaximumRangeValue(XYDataset dataset)

Returns the maximum range value for the specified dataset. This is easy if the dataset implements the `RangeInfo` interface (a good idea if there is an efficient way to determine the maximum value). Otherwise, it involves iterating over the entire data-set. Returns `null` if all the data values are `null`.

Parameters:
  `dataset` - the dataset (`null` not permitted).
Returns:
  The maximum value (possibly `null`).

#### findStackedRangeBounds

    public static Range findStackedRangeBounds(CategoryDataset dataset)

Returns the minimum and maximum values for the dataset's range (y-values), assuming that the series in one category are stacked.

Parameters:
  `dataset` - the dataset (`null` not permitted).
Returns:
  The range (`null` if the dataset contains no values).

#### findStackedRangeBounds

    public static Range findStackedRangeBounds(CategoryDataset dataset,
                               double base)

Returns the minimum and maximum values for the dataset's range (y-values), assuming that the series in one category are stacked.

Parameters:
  `dataset` - the dataset (`null` not permitted).
  `base` - the base value for the bars.
Returns:
  The range (`null` if the dataset contains no values).

#### findStackedRangeBounds

    public static Range findStackedRangeBounds(CategoryDataset dataset,
                               KeyToGroupMap map)

Returns the minimum and maximum values for the dataset's range (y-values), assuming that the series in one category are stacked.

Parameters:
  `dataset` - the dataset.
  `map` - a structure that maps series to groups.
Returns:
  The value range (`null` if the dataset contains no values).

#### findMinimumStackedRangeValue

    public static java.lang.Number findMinimumStackedRangeValue(CategoryDataset dataset)

Returns the minimum value in the dataset range, assuming that values in each category are "stacked".

Parameters:
  `dataset` - the dataset (`null` not permitted).
Returns:
  The minimum value.
See Also:
  `findMaximumStackedRangeValue(CategoryDataset)`

#### findMaximumStackedRangeValue

    public static java.lang.Number findMaximumStackedRangeValue(CategoryDataset dataset)

Returns the maximum value in the dataset range, assuming that values in each category are "stacked".

Parameters:
  `dataset` - the dataset (`null` not permitted).
Returns:
  The maximum value (possibly `null`).
See Also:
  `findMinimumStackedRangeValue(CategoryDataset)`

#### findStackedRangeBounds

    public static Range findStackedRangeBounds(TableXYDataset dataset)

Returns the minimum and maximum values for the dataset's range, assuming that the series are stacked.

Parameters:
  `dataset` - the dataset (`null` not permitted).
Returns:
  The range ([0.0, 0.0] if the dataset contains no values).

#### findStackedRangeBounds

    public static Range findStackedRangeBounds(TableXYDataset dataset,
                               double base)

Returns the minimum and maximum values for the dataset's range, assuming that the series are stacked, using the specified base value.

Parameters:
  `dataset` - the dataset (`null` not permitted).
  `base` - the base value.
Returns:
  The range (`null` if the dataset contains no values).

#### calculateStackTotal

    public static double calculateStackTotal(TableXYDataset dataset,
                             int item)

Calculates the total for the y-values in all series for a given item index.

Parameters:
  `dataset` - the dataset.
  `item` - the item index.
Returns:
  The total.
Since:
  1.0.5

#### findCumulativeRangeBounds

    public static Range findCumulativeRangeBounds(CategoryDataset dataset)

Calculates the range of values for a dataset where each item is the running total of the items for the current series.

Parameters:
  `dataset` - the dataset (`null` not permitted).
Returns:
  The range.
See Also:
  `findRangeBounds(CategoryDataset)`