java.lang.Object | |
↳ | org.jfree.data.general.DatasetUtilities |
A collection of useful static methods relating to datasets.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Calculates the total of all the values in a
PieDataset . | |||||||||||
Calculates the total for the y-values in all series for a given item
index.
| |||||||||||
Creates a
CategoryDataset that contains a copy of the data in
an array. | |||||||||||
Creates a
CategoryDataset that contains a copy of the data in an
array (instances of Double are created to represent the
data items). | |||||||||||
Creates a
CategoryDataset by copying the data from the supplied
KeyedValues instance. | |||||||||||
Creates a
CategoryDataset that contains a copy of the data in
an array (instances of Double are created to represent the
data items). | |||||||||||
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". | |||||||||||
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. | |||||||||||
Creates a pie dataset from a
CategoryDataset by taking all the
values for a single column. | |||||||||||
Creates a pie dataset from a table dataset by taking all the values
for a single column.
| |||||||||||
Creates a pie dataset from a table dataset by taking all the values
for a single row.
| |||||||||||
Creates a pie dataset from a table dataset by taking all the values
for a single row.
| |||||||||||
Calculates the range of values for a dataset where each item is the
running total of the items for the current series.
| |||||||||||
Returns the range of values in the domain (x-values) of a dataset.
| |||||||||||
Returns the range of values in the domain (x-values) of a dataset.
| |||||||||||
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. | |||||||||||
Returns the maximum domain value for the specified dataset.
| |||||||||||
Returns the maximum range value for the specified dataset.
| |||||||||||
Returns the maximum range value for the specified dataset.
| |||||||||||
Returns the maximum value in the dataset range, assuming that values in
each category are "stacked".
| |||||||||||
Finds the minimum domain (or X) value for the specified dataset.
| |||||||||||
Returns the minimum range value for the specified dataset.
| |||||||||||
Returns the minimum range value for the specified dataset.
| |||||||||||
Returns the minimum value in the dataset range, assuming that values in
each category are "stacked".
| |||||||||||
Returns the range of values in the range for the dataset.
| |||||||||||
Returns the range of values in the range for the dataset.
| |||||||||||
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.
| |||||||||||
Finds the bounds of the y-values in the specified dataset, including
only those series that are listed in visibleSeriesKeys.
| |||||||||||
Returns the range of values in the range for the dataset.
| |||||||||||
Returns the range of values in the range for the dataset.
| |||||||||||
Returns the minimum and maximum values for the dataset's range
(y-values), assuming that the series in one category are stacked.
| |||||||||||
Returns the minimum and maximum values for the dataset's range
(y-values), assuming that the series in one category are stacked.
| |||||||||||
Returns the minimum and maximum values for the dataset's range,
assuming that the series are stacked, using the specified base value.
| |||||||||||
Returns the minimum and maximum values for the dataset's range,
assuming that the series are stacked.
| |||||||||||
Returns the minimum and maximum values for the dataset's range
(y-values), assuming that the series in one category are stacked.
| |||||||||||
Returns
true if the dataset is empty (or null ),
and false otherwise. | |||||||||||
Returns
true if the dataset is empty (or null ),
and false otherwise. | |||||||||||
Returns
true if the dataset is empty (or null ),
and false otherwise. | |||||||||||
This method is deprecated.
As of 1.0.10, use
iterateRangeBounds(CategoryDataset, boolean) .
| |||||||||||
Iterates over the items in an
XYDataset to find
the range of x-values. | |||||||||||
Iterates over the items in an
XYDataset to find
the range of x-values. | |||||||||||
Iterates over the data item of the category dataset to find
the range bounds.
| |||||||||||
Iterates over the data item of the category dataset to find
the range bounds.
| |||||||||||
Iterates over the data item of the xy dataset to find
the range bounds.
| |||||||||||
Iterates over the data items of the xy dataset to find
the range bounds.
| |||||||||||
Returns the range of x-values in the specified dataset for the
data items belonging to the visible series.
| |||||||||||
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.
| |||||||||||
Iterates over the data item of the category dataset to find
the range bounds.
| |||||||||||
This method is deprecated.
As of 1.0.10, use
iterateRangeBounds(XYDataset) .
| |||||||||||
Creates an
XYDataset by sampling the specified function over a
fixed range. | |||||||||||
Creates an
XYSeries by sampling the specified function over a
fixed range. |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Calculates the total of all the values in a PieDataset
. If
the dataset contains negative or null
values, they are
ignored.
dataset | the dataset (null not permitted). |
---|
Calculates the total for the y-values in all series for a given item index.
dataset | the dataset. |
---|---|
item | the item index. |
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.
rowKeyPrefix | the row key prefix. |
---|---|
columnKeyPrefix | the column key prefix. |
data | the 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.
rowKeyPrefix | the row key prefix. |
---|---|
columnKeyPrefix | the column key prefix. |
data | the data. |
Creates a CategoryDataset
by copying the data from the supplied
KeyedValues
instance.
rowKey | the row key (null not permitted). |
---|---|
rowData | the row data (null not permitted). |
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.
rowKeys | the row keys (null not permitted). |
---|---|
columnKeys | the column keys (null not permitted). |
data | the data. |
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".
source | the source dataset (null not permitted). |
---|---|
key | a new key for the aggregated items (null not
permitted). |
minimumPercent | the percent threshold. |
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.
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. |
Creates a pie dataset from a CategoryDataset
by taking all the
values for a single column.
dataset | the dataset (null not permitted). |
---|---|
column | the column (zero-based index). |
Creates a pie dataset from a table dataset by taking all the values for a single column.
dataset | the dataset (null not permitted). |
---|---|
columnKey | the column key. |
Creates a pie dataset from a table dataset by taking all the values for a single row.
dataset | the dataset (null not permitted). |
---|---|
rowKey | the row key. |
Creates a pie dataset from a table dataset by taking all the values for a single row.
dataset | the dataset (null not permitted). |
---|---|
row | the row (zero-based index). |
Calculates the range of values for a dataset where each item is the running total of the items for the current series.
dataset | the dataset (null not permitted). |
---|
Returns the range of values in the domain (x-values) of a dataset.
dataset | the dataset (null not permitted). |
---|
null
).
Returns the range of values in the domain (x-values) of a dataset.
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 ). |
null
).
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.
dataset | the dataset (null not permitted). |
---|---|
visibleSeriesKeys | the visible series keys (null
not permitted). |
includeInterval | include the x-interval (if any)? |
null
if the dataset contains no
values.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
.
dataset | the dataset (null not permitted). |
---|
null
).
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
.
dataset | the dataset (null not permitted). |
---|
null
).
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
.
dataset | the dataset (null not permitted). |
---|
null
).
Returns the maximum value in the dataset range, assuming that values in each category are "stacked".
dataset | the dataset (null not permitted). |
---|
null
).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
.
dataset | the dataset (null not permitted). |
---|
null
).
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
.
dataset | the dataset (null not permitted). |
---|
null
).
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
.
dataset | the dataset (null not permitted). |
---|
null
).
Returns the minimum value in the dataset range, assuming that values in each category are "stacked".
dataset | the dataset (null not permitted). |
---|
Returns the range of values in the range for the dataset. This method
is the partner for the findDomainBounds(XYDataset, boolean)
method.
dataset | the dataset (null not permitted). |
---|---|
includeInterval | a flag that determines whether or not the y-interval is taken into account. |
null
).
Returns the range of values in the range for the dataset. This method
is the partner for the findDomainBounds(XYDataset)
method.
dataset | the dataset (null not permitted). |
---|
null
).
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.
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). |
Finds the bounds of the y-values in the specified dataset, including only those series that are listed in visibleSeriesKeys.
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 range of values in the range for the dataset.
dataset | the dataset (null not permitted). |
---|
null
).
Returns the range of values in the range for the dataset.
dataset | the dataset (null not permitted). |
---|---|
includeInterval | a flag that determines whether or not the y-interval is taken into account. |
null
).
Returns the minimum and maximum values for the dataset's range (y-values), assuming that the series in one category are stacked.
dataset | the dataset. |
---|---|
map | a structure that maps series to groups. |
null
if the dataset contains no
values).
Returns the minimum and maximum values for the dataset's range (y-values), assuming that the series in one category are stacked.
dataset | the dataset (null not permitted). |
---|
null
if the dataset contains no values).
Returns the minimum and maximum values for the dataset's range, assuming that the series are stacked, using the specified base value.
dataset | the dataset (null not permitted). |
---|---|
base | the base value. |
null
if the dataset contains no values).
Returns the minimum and maximum values for the dataset's range, assuming that the series are stacked.
dataset | the dataset (null not permitted). |
---|
Returns the minimum and maximum values for the dataset's range (y-values), assuming that the series in one category are stacked.
dataset | the dataset (null not permitted). |
---|---|
base | the base value for the bars. |
null
if the dataset contains no values).
Returns true
if the dataset is empty (or null
),
and false
otherwise.
dataset | the dataset (null permitted). |
---|
Returns true
if the dataset is empty (or null
),
and false
otherwise.
dataset | the dataset (null permitted). |
---|
Returns true
if the dataset is empty (or null
),
and false
otherwise.
dataset | the dataset (null permitted). |
---|
This method is deprecated.
As of 1.0.10, use
iterateRangeBounds(CategoryDataset, boolean)
.
Iterates over the data item of the category dataset to find the range bounds.
dataset | the dataset (null not permitted). |
---|---|
includeInterval | a flag that determines whether or not the y-interval is taken into account. |
null
).Iterates over the items in an XYDataset
to find
the range of x-values.
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. |
null
).
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.
dataset | the dataset (null not permitted). |
---|
null
).
Iterates over the data item of the category dataset to find the range bounds.
dataset | the dataset (null not permitted). |
---|---|
includeInterval | a flag that determines whether or not the y-interval is taken into account. |
null
).Iterates over the data item of the category dataset to find the range bounds.
dataset | the dataset (null not permitted). |
---|
null
).Iterates over the data item of the xy dataset to find the range bounds.
dataset | the dataset (null not permitted). |
---|
null
).Iterates over the data items of the xy dataset to find the range bounds.
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. |
null
).Returns the range of x-values in the specified dataset for the data items belonging to the visible series.
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). |
null
).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.
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). |
null
).Iterates over the data item of the category dataset to find the range bounds.
dataset | the dataset (null not permitted). |
---|---|
visibleSeriesKeys | the visible series keys. |
includeInterval | a flag that determines whether or not the y-interval is taken into account. |
null
).
This method is deprecated.
As of 1.0.10, use iterateRangeBounds(XYDataset)
.
Iterates over the data item of the xy dataset to find the range bounds.
dataset | the dataset (null not permitted). |
---|
null
).Creates an XYDataset
by sampling the specified function over a
fixed range.
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). |
Creates an XYSeries
by sampling the specified function over a
fixed range.
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). |