Java Code Examples for org.jfree.data.xy.XYZDataset#getItemCount()
The following examples show how to use
org.jfree.data.xy.XYZDataset#getItemCount() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DatasetUtilities.java From openstock with GNU General Public License v3.0 | 6 votes |
/** * Iterates over the data items of the xyz dataset to find * the z-dimension bounds. * * @param dataset the dataset (<code>null</code> not permitted). * @param includeInterval include the z-interval (if the dataset has a * z-interval. * * @return The range (possibly <code>null</code>). */ public static Range iterateZBounds(XYZDataset dataset, boolean includeInterval) { double minimum = Double.POSITIVE_INFINITY; double maximum = Double.NEGATIVE_INFINITY; int seriesCount = dataset.getSeriesCount(); for (int series = 0; series < seriesCount; series++) { int itemCount = dataset.getItemCount(series); for (int item = 0; item < itemCount; item++) { double value = dataset.getZValue(series, item); if (!Double.isNaN(value)) { minimum = Math.min(minimum, value); maximum = Math.max(maximum, value); } } } if (minimum == Double.POSITIVE_INFINITY) { return null; } else { return new Range(minimum, maximum); } }
Example 2
Source File: DatasetUtilities.java From ccu-historian with GNU General Public License v3.0 | 6 votes |
/** * Iterates over the data items of the xyz dataset to find * the z-dimension bounds. * * @param dataset the dataset (<code>null</code> not permitted). * @param includeInterval include the z-interval (if the dataset has a * z-interval. * * @return The range (possibly <code>null</code>). */ public static Range iterateZBounds(XYZDataset dataset, boolean includeInterval) { double minimum = Double.POSITIVE_INFINITY; double maximum = Double.NEGATIVE_INFINITY; int seriesCount = dataset.getSeriesCount(); for (int series = 0; series < seriesCount; series++) { int itemCount = dataset.getItemCount(series); for (int item = 0; item < itemCount; item++) { double value = dataset.getZValue(series, item); if (!Double.isNaN(value)) { minimum = Math.min(minimum, value); maximum = Math.max(maximum, value); } } } if (minimum == Double.POSITIVE_INFINITY) { return null; } else { return new Range(minimum, maximum); } }
Example 3
Source File: DatasetUtilities.java From SIMVA-SoS with Apache License 2.0 | 6 votes |
/** * Iterates over the data items of the xyz dataset to find * the z-dimension bounds. * * @param dataset the dataset (<code>null</code> not permitted). * @param includeInterval include the z-interval (if the dataset has a * z-interval. * * @return The range (possibly <code>null</code>). */ public static Range iterateZBounds(XYZDataset dataset, boolean includeInterval) { double minimum = Double.POSITIVE_INFINITY; double maximum = Double.NEGATIVE_INFINITY; int seriesCount = dataset.getSeriesCount(); for (int series = 0; series < seriesCount; series++) { int itemCount = dataset.getItemCount(series); for (int item = 0; item < itemCount; item++) { double value = dataset.getZValue(series, item); if (!Double.isNaN(value)) { minimum = Math.min(minimum, value); maximum = Math.max(maximum, value); } } } if (minimum == Double.POSITIVE_INFINITY) { return null; } else { return new Range(minimum, maximum); } }
Example 4
Source File: DatasetUtilities.java From ECG-Viewer with GNU General Public License v2.0 | 6 votes |
/** * Iterates over the data items of the xyz dataset to find * the z-dimension bounds. * * @param dataset the dataset (<code>null</code> not permitted). * @param includeInterval include the z-interval (if the dataset has a * z-interval. * * @return The range (possibly <code>null</code>). */ public static Range iterateZBounds(XYZDataset dataset, boolean includeInterval) { double minimum = Double.POSITIVE_INFINITY; double maximum = Double.NEGATIVE_INFINITY; int seriesCount = dataset.getSeriesCount(); for (int series = 0; series < seriesCount; series++) { int itemCount = dataset.getItemCount(series); for (int item = 0; item < itemCount; item++) { double value = dataset.getZValue(series, item); if (!Double.isNaN(value)) { minimum = Math.min(minimum, value); maximum = Math.max(maximum, value); } } } if (minimum == Double.POSITIVE_INFINITY) { return null; } else { return new Range(minimum, maximum); } }
Example 5
Source File: DatasetUtilities.java From buffer_bci with GNU General Public License v3.0 | 6 votes |
/** * Iterates over the data items of the xyz dataset to find * the z-dimension bounds. * * @param dataset the dataset (<code>null</code> not permitted). * @param includeInterval include the z-interval (if the dataset has a * z-interval. * * @return The range (possibly <code>null</code>). */ public static Range iterateZBounds(XYZDataset dataset, boolean includeInterval) { double minimum = Double.POSITIVE_INFINITY; double maximum = Double.NEGATIVE_INFINITY; int seriesCount = dataset.getSeriesCount(); for (int series = 0; series < seriesCount; series++) { int itemCount = dataset.getItemCount(series); for (int item = 0; item < itemCount; item++) { double value = dataset.getZValue(series, item); if (!Double.isNaN(value)) { minimum = Math.min(minimum, value); maximum = Math.max(maximum, value); } } } if (minimum == Double.POSITIVE_INFINITY) { return null; } else { return new Range(minimum, maximum); } }
Example 6
Source File: DatasetUtilities.java From buffer_bci with GNU General Public License v3.0 | 6 votes |
/** * Iterates over the data items of the xyz dataset to find * the z-dimension bounds. * * @param dataset the dataset (<code>null</code> not permitted). * @param includeInterval include the z-interval (if the dataset has a * z-interval. * * @return The range (possibly <code>null</code>). */ public static Range iterateZBounds(XYZDataset dataset, boolean includeInterval) { double minimum = Double.POSITIVE_INFINITY; double maximum = Double.NEGATIVE_INFINITY; int seriesCount = dataset.getSeriesCount(); for (int series = 0; series < seriesCount; series++) { int itemCount = dataset.getItemCount(series); for (int item = 0; item < itemCount; item++) { double value = dataset.getZValue(series, item); if (!Double.isNaN(value)) { minimum = Math.min(minimum, value); maximum = Math.max(maximum, value); } } } if (minimum == Double.POSITIVE_INFINITY) { return null; } else { return new Range(minimum, maximum); } }
Example 7
Source File: DatasetUtilities.java From openstock with GNU General Public License v3.0 | 5 votes |
/** * 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. * * @param dataset the dataset (<code>null</code> not permitted). * @param visibleSeriesKeys the visible series keys (<code>null</code> not * permitted). * @param xRange the x-range (<code>null</code> not permitted). * @param 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). * * @return The y-range (possibly <code>null</code>). */ public static Range iterateToFindZBounds(XYZDataset dataset, List visibleSeriesKeys, Range xRange, boolean includeInterval) { ParamChecks.nullNotPermitted(dataset, "dataset"); ParamChecks.nullNotPermitted(visibleSeriesKeys, "visibleSeriesKeys"); ParamChecks.nullNotPermitted(xRange, "xRange"); double minimum = Double.POSITIVE_INFINITY; double maximum = Double.NEGATIVE_INFINITY; Iterator iterator = visibleSeriesKeys.iterator(); while (iterator.hasNext()) { Comparable seriesKey = (Comparable) iterator.next(); int series = dataset.indexOf(seriesKey); int itemCount = dataset.getItemCount(series); for (int item = 0; item < itemCount; item++) { double x = dataset.getXValue(series, item); double z = dataset.getZValue(series, item); if (xRange.contains(x)) { if (!Double.isNaN(z)) { minimum = Math.min(minimum, z); maximum = Math.max(maximum, z); } } } } if (minimum == Double.POSITIVE_INFINITY) { return null; } else { return new Range(minimum, maximum); } }
Example 8
Source File: DatasetUtilities.java From ccu-historian with GNU General Public License v3.0 | 5 votes |
/** * 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. * * @param dataset the dataset (<code>null</code> not permitted). * @param visibleSeriesKeys the visible series keys (<code>null</code> not * permitted). * @param xRange the x-range (<code>null</code> not permitted). * @param 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). * * @return The y-range (possibly <code>null</code>). */ public static Range iterateToFindZBounds(XYZDataset dataset, List visibleSeriesKeys, Range xRange, boolean includeInterval) { ParamChecks.nullNotPermitted(dataset, "dataset"); ParamChecks.nullNotPermitted(visibleSeriesKeys, "visibleSeriesKeys"); ParamChecks.nullNotPermitted(xRange, "xRange"); double minimum = Double.POSITIVE_INFINITY; double maximum = Double.NEGATIVE_INFINITY; Iterator iterator = visibleSeriesKeys.iterator(); while (iterator.hasNext()) { Comparable seriesKey = (Comparable) iterator.next(); int series = dataset.indexOf(seriesKey); int itemCount = dataset.getItemCount(series); for (int item = 0; item < itemCount; item++) { double x = dataset.getXValue(series, item); double z = dataset.getZValue(series, item); if (xRange.contains(x)) { if (!Double.isNaN(z)) { minimum = Math.min(minimum, z); maximum = Math.max(maximum, z); } } } } if (minimum == Double.POSITIVE_INFINITY) { return null; } else { return new Range(minimum, maximum); } }
Example 9
Source File: DatasetUtilities.java From SIMVA-SoS with Apache License 2.0 | 5 votes |
/** * 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. * * @param dataset the dataset (<code>null</code> not permitted). * @param visibleSeriesKeys the visible series keys (<code>null</code> not * permitted). * @param xRange the x-range (<code>null</code> not permitted). * @param 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). * * @return The y-range (possibly <code>null</code>). */ public static Range iterateToFindZBounds(XYZDataset dataset, List visibleSeriesKeys, Range xRange, boolean includeInterval) { ParamChecks.nullNotPermitted(dataset, "dataset"); ParamChecks.nullNotPermitted(visibleSeriesKeys, "visibleSeriesKeys"); ParamChecks.nullNotPermitted(xRange, "xRange"); double minimum = Double.POSITIVE_INFINITY; double maximum = Double.NEGATIVE_INFINITY; Iterator iterator = visibleSeriesKeys.iterator(); while (iterator.hasNext()) { Comparable seriesKey = (Comparable) iterator.next(); int series = dataset.indexOf(seriesKey); int itemCount = dataset.getItemCount(series); for (int item = 0; item < itemCount; item++) { double x = dataset.getXValue(series, item); double z = dataset.getZValue(series, item); if (xRange.contains(x)) { if (!Double.isNaN(z)) { minimum = Math.min(minimum, z); maximum = Math.max(maximum, z); } } } } if (minimum == Double.POSITIVE_INFINITY) { return null; } else { return new Range(minimum, maximum); } }
Example 10
Source File: DatasetUtilities.java From ECG-Viewer with GNU General Public License v2.0 | 5 votes |
/** * 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. * * @param dataset the dataset (<code>null</code> not permitted). * @param visibleSeriesKeys the visible series keys (<code>null</code> not * permitted). * @param xRange the x-range (<code>null</code> not permitted). * @param 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). * * @return The y-range (possibly <code>null</code>). */ public static Range iterateToFindZBounds(XYZDataset dataset, List visibleSeriesKeys, Range xRange, boolean includeInterval) { ParamChecks.nullNotPermitted(dataset, "dataset"); ParamChecks.nullNotPermitted(visibleSeriesKeys, "visibleSeriesKeys"); ParamChecks.nullNotPermitted(xRange, "xRange"); double minimum = Double.POSITIVE_INFINITY; double maximum = Double.NEGATIVE_INFINITY; Iterator iterator = visibleSeriesKeys.iterator(); while (iterator.hasNext()) { Comparable seriesKey = (Comparable) iterator.next(); int series = dataset.indexOf(seriesKey); int itemCount = dataset.getItemCount(series); for (int item = 0; item < itemCount; item++) { double x = dataset.getXValue(series, item); double z = dataset.getZValue(series, item); if (xRange.contains(x)) { if (!Double.isNaN(z)) { minimum = Math.min(minimum, z); maximum = Math.max(maximum, z); } } } } if (minimum == Double.POSITIVE_INFINITY) { return null; } else { return new Range(minimum, maximum); } }
Example 11
Source File: BubbleChartExpression.java From pentaho-reporting with GNU Lesser General Public License v2.1 | 5 votes |
private double precomputeMaxZ( final XYZDataset dataset ) { double retval = Double.MIN_VALUE; for ( int series = 0; series < dataset.getSeriesCount(); series++ ) { final int itemcount = dataset.getItemCount( series ); for ( int item = 0; item < itemcount; item++ ) { final double value = dataset.getZValue( series, item ); if ( retval < value ) { retval = value; } } } return retval; }
Example 12
Source File: DatasetUtilities.java From buffer_bci with GNU General Public License v3.0 | 5 votes |
/** * 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. * * @param dataset the dataset (<code>null</code> not permitted). * @param visibleSeriesKeys the visible series keys (<code>null</code> not * permitted). * @param xRange the x-range (<code>null</code> not permitted). * @param 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). * * @return The y-range (possibly <code>null</code>). */ public static Range iterateToFindZBounds(XYZDataset dataset, List visibleSeriesKeys, Range xRange, boolean includeInterval) { ParamChecks.nullNotPermitted(dataset, "dataset"); ParamChecks.nullNotPermitted(visibleSeriesKeys, "visibleSeriesKeys"); ParamChecks.nullNotPermitted(xRange, "xRange"); double minimum = Double.POSITIVE_INFINITY; double maximum = Double.NEGATIVE_INFINITY; Iterator iterator = visibleSeriesKeys.iterator(); while (iterator.hasNext()) { Comparable seriesKey = (Comparable) iterator.next(); int series = dataset.indexOf(seriesKey); int itemCount = dataset.getItemCount(series); for (int item = 0; item < itemCount; item++) { double x = dataset.getXValue(series, item); double z = dataset.getZValue(series, item); if (xRange.contains(x)) { if (!Double.isNaN(z)) { minimum = Math.min(minimum, z); maximum = Math.max(maximum, z); } } } } if (minimum == Double.POSITIVE_INFINITY) { return null; } else { return new Range(minimum, maximum); } }
Example 13
Source File: DatasetUtilities.java From buffer_bci with GNU General Public License v3.0 | 5 votes |
/** * 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. * * @param dataset the dataset (<code>null</code> not permitted). * @param visibleSeriesKeys the visible series keys (<code>null</code> not * permitted). * @param xRange the x-range (<code>null</code> not permitted). * @param 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). * * @return The y-range (possibly <code>null</code>). */ public static Range iterateToFindZBounds(XYZDataset dataset, List visibleSeriesKeys, Range xRange, boolean includeInterval) { ParamChecks.nullNotPermitted(dataset, "dataset"); ParamChecks.nullNotPermitted(visibleSeriesKeys, "visibleSeriesKeys"); ParamChecks.nullNotPermitted(xRange, "xRange"); double minimum = Double.POSITIVE_INFINITY; double maximum = Double.NEGATIVE_INFINITY; Iterator iterator = visibleSeriesKeys.iterator(); while (iterator.hasNext()) { Comparable seriesKey = (Comparable) iterator.next(); int series = dataset.indexOf(seriesKey); int itemCount = dataset.getItemCount(series); for (int item = 0; item < itemCount; item++) { double x = dataset.getXValue(series, item); double z = dataset.getZValue(series, item); if (xRange.contains(x)) { if (!Double.isNaN(z)) { minimum = Math.min(minimum, z); maximum = Math.max(maximum, z); } } } } if (minimum == Double.POSITIVE_INFINITY) { return null; } else { return new Range(minimum, maximum); } }