Java Code Examples for org.jfree.data.xy.IntervalXYDataset#getSeriesCount()
The following examples show how to use
org.jfree.data.xy.IntervalXYDataset#getSeriesCount() .
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: ClusteredXYBarRenderer.java From openstock with GNU General Public License v3.0 | 5 votes |
/** * Iterates over the items in an {@link IntervalXYDataset} to find * the range of x-values including the interval OFFSET so that it centers * the interval around the start value. * * @param dataset the dataset (<code>null</code> not permitted). * * @return The range (possibly <code>null</code>). */ protected Range findDomainBoundsWithOffset(IntervalXYDataset dataset) { ParamChecks.nullNotPermitted(dataset, "dataset"); double minimum = Double.POSITIVE_INFINITY; double maximum = Double.NEGATIVE_INFINITY; int seriesCount = dataset.getSeriesCount(); double lvalue; double uvalue; for (int series = 0; series < seriesCount; series++) { int itemCount = dataset.getItemCount(series); for (int item = 0; item < itemCount; item++) { lvalue = dataset.getStartXValue(series, item); uvalue = dataset.getEndXValue(series, item); double offset = (uvalue - lvalue) / 2.0; lvalue = lvalue - offset; uvalue = uvalue - offset; minimum = Math.min(minimum, lvalue); maximum = Math.max(maximum, uvalue); } } if (minimum > maximum) { return null; } else { return new Range(minimum, maximum); } }
Example 2
Source File: ClusteredXYBarRenderer.java From ccu-historian with GNU General Public License v3.0 | 5 votes |
/** * Iterates over the items in an {@link IntervalXYDataset} to find * the range of x-values including the interval OFFSET so that it centers * the interval around the start value. * * @param dataset the dataset (<code>null</code> not permitted). * * @return The range (possibly <code>null</code>). */ protected Range findDomainBoundsWithOffset(IntervalXYDataset dataset) { ParamChecks.nullNotPermitted(dataset, "dataset"); double minimum = Double.POSITIVE_INFINITY; double maximum = Double.NEGATIVE_INFINITY; int seriesCount = dataset.getSeriesCount(); double lvalue; double uvalue; for (int series = 0; series < seriesCount; series++) { int itemCount = dataset.getItemCount(series); for (int item = 0; item < itemCount; item++) { lvalue = dataset.getStartXValue(series, item); uvalue = dataset.getEndXValue(series, item); double offset = (uvalue - lvalue) / 2.0; lvalue = lvalue - offset; uvalue = uvalue - offset; minimum = Math.min(minimum, lvalue); maximum = Math.max(maximum, uvalue); } } if (minimum > maximum) { return null; } else { return new Range(minimum, maximum); } }
Example 3
Source File: ClusteredXYBarRenderer.java From SIMVA-SoS with Apache License 2.0 | 5 votes |
/** * Iterates over the items in an {@link IntervalXYDataset} to find * the range of x-values including the interval OFFSET so that it centers * the interval around the start value. * * @param dataset the dataset (<code>null</code> not permitted). * * @return The range (possibly <code>null</code>). */ protected Range findDomainBoundsWithOffset(IntervalXYDataset dataset) { ParamChecks.nullNotPermitted(dataset, "dataset"); double minimum = Double.POSITIVE_INFINITY; double maximum = Double.NEGATIVE_INFINITY; int seriesCount = dataset.getSeriesCount(); double lvalue; double uvalue; for (int series = 0; series < seriesCount; series++) { int itemCount = dataset.getItemCount(series); for (int item = 0; item < itemCount; item++) { lvalue = dataset.getStartXValue(series, item); uvalue = dataset.getEndXValue(series, item); double offset = (uvalue - lvalue) / 2.0; lvalue = lvalue - offset; uvalue = uvalue - offset; minimum = Math.min(minimum, lvalue); maximum = Math.max(maximum, uvalue); } } if (minimum > maximum) { return null; } else { return new Range(minimum, maximum); } }
Example 4
Source File: ClusteredXYBarRenderer.java From ECG-Viewer with GNU General Public License v2.0 | 5 votes |
/** * Iterates over the items in an {@link IntervalXYDataset} to find * the range of x-values including the interval OFFSET so that it centers * the interval around the start value. * * @param dataset the dataset (<code>null</code> not permitted). * * @return The range (possibly <code>null</code>). */ protected Range findDomainBoundsWithOffset(IntervalXYDataset dataset) { ParamChecks.nullNotPermitted(dataset, "dataset"); double minimum = Double.POSITIVE_INFINITY; double maximum = Double.NEGATIVE_INFINITY; int seriesCount = dataset.getSeriesCount(); double lvalue; double uvalue; for (int series = 0; series < seriesCount; series++) { int itemCount = dataset.getItemCount(series); for (int item = 0; item < itemCount; item++) { lvalue = dataset.getStartXValue(series, item); uvalue = dataset.getEndXValue(series, item); double offset = (uvalue - lvalue) / 2.0; lvalue = lvalue - offset; uvalue = uvalue - offset; minimum = Math.min(minimum, lvalue); maximum = Math.max(maximum, uvalue); } } if (minimum > maximum) { return null; } else { return new Range(minimum, maximum); } }
Example 5
Source File: ClusteredXYBarRenderer.java From astor with GNU General Public License v2.0 | 5 votes |
/** * Iterates over the items in an {@link IntervalXYDataset} to find * the range of x-values including the interval OFFSET so that it centers * the interval around the start value. * * @param dataset the dataset (<code>null</code> not permitted). * * @return The range (possibly <code>null</code>). */ protected Range findDomainBoundsWithOffset(IntervalXYDataset dataset) { if (dataset == null) { throw new IllegalArgumentException("Null 'dataset' argument."); } double minimum = Double.POSITIVE_INFINITY; double maximum = Double.NEGATIVE_INFINITY; int seriesCount = dataset.getSeriesCount(); double lvalue; double uvalue; for (int series = 0; series < seriesCount; series++) { int itemCount = dataset.getItemCount(series); for (int item = 0; item < itemCount; item++) { lvalue = dataset.getStartXValue(series, item); uvalue = dataset.getEndXValue(series, item); double offset = (uvalue - lvalue) / 2.0; lvalue = lvalue - offset; uvalue = uvalue - offset; minimum = Math.min(minimum, lvalue); maximum = Math.max(maximum, uvalue); } } if (minimum > maximum) { return null; } else { return new Range(minimum, maximum); } }
Example 6
Source File: ClusteredXYBarRenderer.java From astor with GNU General Public License v2.0 | 5 votes |
/** * Iterates over the items in an {@link IntervalXYDataset} to find * the range of x-values including the interval OFFSET so that it centers * the interval around the start value. * * @param dataset the dataset (<code>null</code> not permitted). * * @return The range (possibly <code>null</code>). */ protected Range findDomainBoundsWithOffset(IntervalXYDataset dataset) { if (dataset == null) { throw new IllegalArgumentException("Null 'dataset' argument."); } double minimum = Double.POSITIVE_INFINITY; double maximum = Double.NEGATIVE_INFINITY; int seriesCount = dataset.getSeriesCount(); double lvalue; double uvalue; for (int series = 0; series < seriesCount; series++) { int itemCount = dataset.getItemCount(series); for (int item = 0; item < itemCount; item++) { lvalue = dataset.getStartXValue(series, item); uvalue = dataset.getEndXValue(series, item); double offset = (uvalue - lvalue) / 2.0; lvalue = lvalue - offset; uvalue = uvalue - offset; minimum = Math.min(minimum, lvalue); maximum = Math.max(maximum, uvalue); } } if (minimum > maximum) { return null; } else { return new Range(minimum, maximum); } }
Example 7
Source File: ClusteredXYBarRenderer.java From buffer_bci with GNU General Public License v3.0 | 5 votes |
/** * Iterates over the items in an {@link IntervalXYDataset} to find * the range of x-values including the interval OFFSET so that it centers * the interval around the start value. * * @param dataset the dataset (<code>null</code> not permitted). * * @return The range (possibly <code>null</code>). */ protected Range findDomainBoundsWithOffset(IntervalXYDataset dataset) { ParamChecks.nullNotPermitted(dataset, "dataset"); double minimum = Double.POSITIVE_INFINITY; double maximum = Double.NEGATIVE_INFINITY; int seriesCount = dataset.getSeriesCount(); double lvalue; double uvalue; for (int series = 0; series < seriesCount; series++) { int itemCount = dataset.getItemCount(series); for (int item = 0; item < itemCount; item++) { lvalue = dataset.getStartXValue(series, item); uvalue = dataset.getEndXValue(series, item); double offset = (uvalue - lvalue) / 2.0; lvalue = lvalue - offset; uvalue = uvalue - offset; minimum = Math.min(minimum, lvalue); maximum = Math.max(maximum, uvalue); } } if (minimum > maximum) { return null; } else { return new Range(minimum, maximum); } }
Example 8
Source File: ClusteredXYBarRenderer.java From buffer_bci with GNU General Public License v3.0 | 5 votes |
/** * Iterates over the items in an {@link IntervalXYDataset} to find * the range of x-values including the interval OFFSET so that it centers * the interval around the start value. * * @param dataset the dataset (<code>null</code> not permitted). * * @return The range (possibly <code>null</code>). */ protected Range findDomainBoundsWithOffset(IntervalXYDataset dataset) { ParamChecks.nullNotPermitted(dataset, "dataset"); double minimum = Double.POSITIVE_INFINITY; double maximum = Double.NEGATIVE_INFINITY; int seriesCount = dataset.getSeriesCount(); double lvalue; double uvalue; for (int series = 0; series < seriesCount; series++) { int itemCount = dataset.getItemCount(series); for (int item = 0; item < itemCount; item++) { lvalue = dataset.getStartXValue(series, item); uvalue = dataset.getEndXValue(series, item); double offset = (uvalue - lvalue) / 2.0; lvalue = lvalue - offset; uvalue = uvalue - offset; minimum = Math.min(minimum, lvalue); maximum = Math.max(maximum, uvalue); } } if (minimum > maximum) { return null; } else { return new Range(minimum, maximum); } }