org.jfree.data.general
Class DatasetUtilities

java.lang.Object
  extended byorg.jfree.data.general.DatasetUtilities

public final class DatasetUtilities
extends java.lang.Object

A collection of useful static methods relating to datasets.


Method Summary
static double calculatePieDatasetTotal(PieDataset dataset)
          Calculates the total of all the values in a PieDataset.
static CategoryDataset createCategoryDataset(java.lang.String[] rowKeys, java.lang.String[] 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.String 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 java.lang.Number[] createNumberArray(double[] data)
          Constructs an array of Number objects from an array of double primitives.
static java.lang.Number[][] createNumberArray2D(double[][] data)
          Constructs an array of arrays of Number objects from a corresponding structure containing double primitives.
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 findCumulativeRangeExtent(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 findDomainExtent(Dataset dataset)
          Deprecated. Use findDomainExtent(XYDataset) instead.
static Range findDomainExtent(XYDataset dataset)
          Returns the range of values in the domain (x-values) of a dataset.
static java.lang.Number findMaximumDomainValue(Dataset dataset)
          Deprecated. Use findMaximumDomainValue(XYDataset).
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(Dataset dataset)
          Deprecated. Use findMaximumRangeValue(CategoryDataset) or findMaximumRangeValue(XYDataset).
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(Dataset dataset)
          Deprecated. Use findMinimumDomainValue(XYDataset).
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(Dataset dataset)
          Deprecated. Use findMinimumRangeValue(CategoryDataset) or findMinimumRangeValue(XYDataset).
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 findRangeExtent(CategoryDataset dataset)
          Returns the range of values in the range for the dataset.
static Range findRangeExtent(Dataset dataset)
          Deprecated. Use findRangeExtent(CategoryDataset) or findRangeExtent(XYDataset).
static Range findRangeExtent(XYDataset dataset)
          Returns the range of values in the range for the dataset.
static Range findStackedRangeExtent(CategoryDataset dataset)
          Returns the minimum and maximum values for the dataset's range (as in domain/range), assuming that the series in one category are stacked.
static Range findStackedRangeExtent(CategoryDataset dataset, KeyToGroupMap map)
          Returns the minimum and maximum values for the dataset's range (as in domain/range), assuming that the series in one category are stacked.
static Range findStackedRangeExtent(TableXYDataset dataset)
          Returns the minimum and maximum values for the dataset's range, assuming that the series are stacked.
static Range findStackedRangeExtent(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 getCumulativeRangeExtent(CategoryDataset dataset)
          Deprecated. Use findCumulativeRangeExtent().
static Range getDomainExtent(Dataset dataset)
          Deprecated. Use findDomainExtent().
static java.lang.Number getMaximumDomainValue(Dataset dataset)
          Deprecated. Use findMaximumDomainValue();
static java.lang.Number getMaximumRangeValue(Dataset dataset)
          Deprecated. Use findMaximumRangeValue().
static java.lang.Number getMaximumStackedRangeValue(CategoryDataset dataset)
          Deprecated. Use findMaximumStackedRangeValue().
static java.lang.Number getMinimumRangeValue(Dataset dataset)
          Deprecated. Use findMinimumRangeValue().
static java.lang.Number getMinimumStackedRangeValue(CategoryDataset dataset)
          Deprecated. Use findMinimumStackedRangeValue().
static Range getRangeExtent(Dataset dataset)
          Deprecated. Use findRangeExtent().
static Range getStackedRangeExtent(CategoryDataset dataset)
          Deprecated. Use findStackedRangeExtent().
static Range getStackedRangeExtent(CategoryDataset dataset, KeyToGroupMap map)
          Deprecated. Use findStackedRangeExtent().
static Range getStackedRangeExtent(TableXYDataset dataset)
          Deprecated. Use findStackedRangeExtent().
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 iterateCategoryRangeExtent(CategoryDataset dataset)
          Iterates over the data item of the category dataset to find the range extent.
static Range iterateDomainExtent(XYDataset dataset)
          Iterates over the items in an XYDataset to find the range of x-values.
static Range iterateXYRangeExtent(XYDataset dataset)
          Iterates over the data item of the xy dataset to find the range extent.
static PieDataset limitPieDataset(PieDataset dataset, double percentThreshold)
          Creates an "Other" slice for percentages below the percent threshold.
static PieDataset limitPieDataset(PieDataset dataset, double percentThreshold, int minItems)
          Create an "Other" slice for percentages below the percent threshold providing there are more slices below the percent threshold than specified in the slice threshold.
static PieDataset limitPieDataset(PieDataset dataset, double percentThreshold, int minItems, java.lang.Comparable key)
          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 XYDataset sampleFunction2D(Function2D f, double start, double end, int samples, java.lang.String seriesName)
          Creates an XYDataset 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

createNumberArray

public static java.lang.Number[] createNumberArray(double[] data)
Constructs an array of Number objects from an array of double primitives.

Parameters:
data - the data (null not permitted).
Returns:
An array of Double.

createNumberArray2D

public static java.lang.Number[][] createNumberArray2D(double[][] data)
Constructs an array of arrays of Number objects from a corresponding structure containing double primitives.

Parameters:
data - the data (null not permitted).
Returns:
An array of Double.

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.

limitPieDataset

public static PieDataset limitPieDataset(PieDataset dataset,
                                         double percentThreshold)
Creates an "Other" slice for percentages below the percent threshold.

Parameters:
dataset - the PieDataset.
percentThreshold - the percent threshold.
Returns:
A PieDataset.

limitPieDataset

public static PieDataset limitPieDataset(PieDataset dataset,
                                         double percentThreshold,
                                         int minItems)
Create an "Other" slice for percentages below the percent threshold providing there are more slices below the percent threshold than specified in the slice threshold.

Parameters:
dataset - the source dataset.
percentThreshold - the percent threshold (ten percent is 0.10).
minItems - only aggregate low values if there are at least this many.
Returns:
A PieDataset.

limitPieDataset

public static PieDataset limitPieDataset(PieDataset dataset,
                                         double percentThreshold,
                                         int minItems,
                                         java.lang.Comparable key)
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:
dataset - the source dataset.
percentThreshold - the percent threshold (ten percent is 0.10).
minItems - only aggregate low values if there are at least this many.
key - the key to represent the aggregated items.
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.String[] rowKeys,
                                                    java.lang.String[] 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.String 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.String seriesName)
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).
seriesName - the name to give the resulting series (null not permitted).
Returns:
A dataset.

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.

findDomainExtent

public static Range findDomainExtent(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).

iterateDomainExtent

public static Range iterateDomainExtent(XYDataset dataset)
Iterates over the items in an XYDataset to find the range of x-values.

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

findRangeExtent

public static Range findRangeExtent(CategoryDataset dataset)
Returns the range of values in the range for the dataset. This method is the partner for the getDomainExtent method.

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

findRangeExtent

public static Range findRangeExtent(XYDataset dataset)
Returns the range of values in the range for the dataset. This method is the partner for the getDomainExtent method.

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

iterateCategoryRangeExtent

public static Range iterateCategoryRangeExtent(CategoryDataset dataset)
Iterates over the data item of the category dataset to find the range extent.

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

iterateXYRangeExtent

public static Range iterateXYRangeExtent(XYDataset dataset)
Iterates over the data item of the xy dataset to find the range extent.

Parameters:
dataset - the dataset (null not permitted).
Returns:
The 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).

findStackedRangeExtent

public static Range findStackedRangeExtent(CategoryDataset dataset)
Returns the minimum and maximum values for the dataset's range (as in domain/range), assuming that the series in one category are stacked.

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

findStackedRangeExtent

public static Range findStackedRangeExtent(CategoryDataset dataset,
                                           KeyToGroupMap map)
Returns the minimum and maximum values for the dataset's range (as in domain/range), 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.

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.
Returns:
the minimum value.

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 permitted).
Returns:
The maximum value (possibly null).

findStackedRangeExtent

public static Range findStackedRangeExtent(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.

findStackedRangeExtent

public static Range findStackedRangeExtent(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.

findCumulativeRangeExtent

public static Range findCumulativeRangeExtent(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.
Returns:
The range.

getDomainExtent

public static Range getDomainExtent(Dataset dataset)
Deprecated. Use findDomainExtent().

Returns the range of values in the domain for the dataset. If the supplied dataset is null, the range returned is null.

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

getRangeExtent

public static Range getRangeExtent(Dataset dataset)
Deprecated. Use findRangeExtent().

Returns the range of values in the range for the dataset. This method is the partner for the getDomainExtent method.

Parameters:
dataset - the dataset.
Returns:
The range of values in the range for the dataset.

getMaximumDomainValue

public static java.lang.Number getMaximumDomainValue(Dataset dataset)
Deprecated. Use findMaximumDomainValue();

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.
Returns:
The maximum value (possibly null).

getMinimumRangeValue

public static java.lang.Number getMinimumRangeValue(Dataset dataset)
Deprecated. Use findMinimumRangeValue().

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).

getMaximumRangeValue

public static java.lang.Number getMaximumRangeValue(Dataset dataset)
Deprecated. Use findMaximumRangeValue().

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.
Returns:
The maximum value (possibly null).

findDomainExtent

public static Range findDomainExtent(Dataset dataset)
Deprecated. Use findDomainExtent(XYDataset) instead.

Returns the range of values in the domain for the dataset. If the supplied dataset is null, the range returned is null.

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

findRangeExtent

public static Range findRangeExtent(Dataset dataset)
Deprecated. Use findRangeExtent(CategoryDataset) or findRangeExtent(XYDataset).

Returns the range of values in the range for the dataset. This method is the partner for the getDomainExtent method.

Parameters:
dataset - the dataset.
Returns:
The range of values in the range for the dataset.

findMinimumDomainValue

public static java.lang.Number findMinimumDomainValue(Dataset dataset)
Deprecated. Use findMinimumDomainValue(XYDataset).

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(Dataset dataset)
Deprecated. Use findMaximumDomainValue(XYDataset).

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.
Returns:
The maximum value (possibly null).

getStackedRangeExtent

public static Range getStackedRangeExtent(CategoryDataset dataset)
Deprecated. Use findStackedRangeExtent().

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

Parameters:
dataset - the dataset.
Returns:
The range.

getStackedRangeExtent

public static Range getStackedRangeExtent(TableXYDataset dataset)
Deprecated. Use findStackedRangeExtent().

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

Parameters:
dataset - the dataset.
Returns:
the value range.

getCumulativeRangeExtent

public static Range getCumulativeRangeExtent(CategoryDataset dataset)
Deprecated. Use findCumulativeRangeExtent().

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.
Returns:
The range.

findMinimumRangeValue

public static java.lang.Number findMinimumRangeValue(Dataset dataset)
Deprecated. Use findMinimumRangeValue(CategoryDataset) or findMinimumRangeValue(XYDataset).

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(Dataset dataset)
Deprecated. Use findMaximumRangeValue(CategoryDataset) or findMaximumRangeValue(XYDataset).

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.
Returns:
The maximum value (possibly null).

getStackedRangeExtent

public static Range getStackedRangeExtent(CategoryDataset dataset,
                                          KeyToGroupMap map)
Deprecated. Use findStackedRangeExtent().

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

Parameters:
dataset - the dataset.
map - a structure that maps series to groups.
Returns:
The range.

getMinimumStackedRangeValue

public static java.lang.Number getMinimumStackedRangeValue(CategoryDataset dataset)
Deprecated. Use findMinimumStackedRangeValue().

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

Parameters:
dataset - the dataset.
Returns:
the minimum value.

getMaximumStackedRangeValue

public static java.lang.Number getMaximumStackedRangeValue(CategoryDataset dataset)
Deprecated. Use findMaximumStackedRangeValue().

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

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