Java Code Examples for org.jfree.data.xy.DefaultIntervalXYDataset#addSeries()
The following examples show how to use
org.jfree.data.xy.DefaultIntervalXYDataset#addSeries() .
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: DatasetUtilitiesTest.java From ECG-Viewer with GNU General Public License v2.0 | 6 votes |
/** * This test checks that the standard method has 'includeInterval' * defaulting to true. */ @Test public void testFindDomainBounds2() { DefaultIntervalXYDataset dataset = new DefaultIntervalXYDataset(); double[] x1 = new double[] {1.0, 2.0, 3.0}; double[] x1Start = new double[] {0.9, 1.9, 2.9}; double[] x1End = new double[] {1.1, 2.1, 3.1}; double[] y1 = new double[] {4.0, 5.0, 6.0}; double[] y1Start = new double[] {1.09, 2.09, 3.09}; double[] y1End = new double[] {1.11, 2.11, 3.11}; double[][] data1 = new double[][] {x1, x1Start, x1End, y1, y1Start, y1End}; dataset.addSeries("S1", data1); Range r = DatasetUtilities.findDomainBounds(dataset); assertEquals(0.9, r.getLowerBound(), EPSILON); assertEquals(3.1, r.getUpperBound(), EPSILON); }
Example 2
Source File: XYBarRendererTest.java From ECG-Viewer with GNU General Public License v2.0 | 6 votes |
/** * A simple test for the findRangeBounds() method. */ @Test public void testFindRangeBounds() { DefaultIntervalXYDataset dataset = new DefaultIntervalXYDataset(); double[] x = {1.0, 2.0, 3.0, 4.0}; double[] startx = {0.9, 1.8, 2.7, 3.6}; double[] endx = {1.1, 2.2, 3.3, 4.4}; double[] y = {1.0, 2.0, 3.0, 4.0}; double[] starty = {0.9, 1.8, 2.7, 3.6}; double[] endy = {1.1, 2.2, 3.3, 4.4}; double[][] data = new double[][] {x, startx, endx, y, starty, endy}; dataset.addSeries("Series 1", data); XYBarRenderer renderer = new XYBarRenderer(); renderer.setUseYInterval(true); Range r = renderer.findRangeBounds(dataset); assertEquals(0.9, r.getLowerBound(), EPSILON); assertEquals(4.4, r.getUpperBound(), EPSILON); renderer.setUseYInterval(false); r = renderer.findRangeBounds(dataset); assertEquals(1.0, r.getLowerBound(), EPSILON); assertEquals(4.0, r.getUpperBound(), EPSILON); }
Example 3
Source File: DatasetUtilitiesTest.java From SIMVA-SoS with Apache License 2.0 | 6 votes |
/** * Check that NaN values in the IntervalXYDataset are ignored. */ @Test public void testIterateDomainBounds_NaN2() { DefaultIntervalXYDataset dataset = new DefaultIntervalXYDataset(); double[] x1 = new double[] {Double.NaN, 2.0, 3.0}; double[] x1Start = new double[] {0.9, Double.NaN, 2.9}; double[] x1End = new double[] {1.1, Double.NaN, 3.1}; double[] y1 = new double[] {4.0, 5.0, 6.0}; double[] y1Start = new double[] {1.09, 2.09, 3.09}; double[] y1End = new double[] {1.11, 2.11, 3.11}; double[][] data1 = new double[][] {x1, x1Start, x1End, y1, y1Start, y1End}; dataset.addSeries("S1", data1); Range r = DatasetUtilities.iterateDomainBounds(dataset, false); assertEquals(2.0, r.getLowerBound(), EPSILON); assertEquals(3.0, r.getUpperBound(), EPSILON); r = DatasetUtilities.iterateDomainBounds(dataset, true); assertEquals(0.9, r.getLowerBound(), EPSILON); assertEquals(3.1, r.getUpperBound(), EPSILON); }
Example 4
Source File: DefaultIntervalXYDatasetTests.java From astor with GNU General Public License v2.0 | 6 votes |
/** * Creates a sample dataset for testing. * * @return A sample dataset. */ public DefaultIntervalXYDataset createSampleDataset1() { DefaultIntervalXYDataset d = new DefaultIntervalXYDataset(); double[] x1 = new double[] {1.0, 2.0, 3.0}; double[] x1Start = new double[] {0.9, 1.9, 2.9}; double[] x1End = new double[] {1.1, 2.1, 3.1}; double[] y1 = new double[] {4.0, 5.0, 6.0}; double[] y1Start = new double[] {1.09, 2.09, 3.09}; double[] y1End = new double[] {1.11, 2.11, 3.11}; double[][] data1 = new double[][] {x1, x1Start, x1End, y1, y1Start, y1End}; d.addSeries("S1", data1); double[] x2 = new double[] {11.0, 12.0, 13.0}; double[] x2Start = new double[] {10.9, 11.9, 12.9}; double[] x2End = new double[] {11.1, 12.1, 13.1}; double[] y2 = new double[] {14.0, 15.0, 16.0}; double[] y2Start = new double[] {11.09, 12.09, 13.09}; double[] y2End = new double[] {11.11, 12.11, 13.11}; double[][] data2 = new double[][] {x2, x2Start, x2End, y2, y2Start, y2End}; d.addSeries("S2", data2); return d; }
Example 5
Source File: DatasetUtilitiesTest.java From SIMVA-SoS with Apache License 2.0 | 6 votes |
/** * This test checks that when the 'includeInterval' flag is false, the * bounds come from the regular x-values. */ @Test public void testFindDomainBounds3() { DefaultIntervalXYDataset dataset = new DefaultIntervalXYDataset(); double[] x1 = new double[] {1.0, 2.0, 3.0}; double[] x1Start = new double[] {0.9, 1.9, 2.9}; double[] x1End = new double[] {1.1, 2.1, 3.1}; double[] y1 = new double[] {4.0, 5.0, 6.0}; double[] y1Start = new double[] {1.09, 2.09, 3.09}; double[] y1End = new double[] {1.11, 2.11, 3.11}; double[][] data1 = new double[][] {x1, x1Start, x1End, y1, y1Start, y1End}; dataset.addSeries("S1", data1); Range r = DatasetUtilities.findDomainBounds(dataset, false); assertEquals(1.0, r.getLowerBound(), EPSILON); assertEquals(3.0, r.getUpperBound(), EPSILON); }
Example 6
Source File: DatasetUtilitiesTest.java From SIMVA-SoS with Apache License 2.0 | 6 votes |
/** * This test checks that the standard method has 'includeInterval' * defaulting to true. */ @Test public void testFindDomainBounds2() { DefaultIntervalXYDataset dataset = new DefaultIntervalXYDataset(); double[] x1 = new double[] {1.0, 2.0, 3.0}; double[] x1Start = new double[] {0.9, 1.9, 2.9}; double[] x1End = new double[] {1.1, 2.1, 3.1}; double[] y1 = new double[] {4.0, 5.0, 6.0}; double[] y1Start = new double[] {1.09, 2.09, 3.09}; double[] y1End = new double[] {1.11, 2.11, 3.11}; double[][] data1 = new double[][] {x1, x1Start, x1End, y1, y1Start, y1End}; dataset.addSeries("S1", data1); Range r = DatasetUtilities.findDomainBounds(dataset); assertEquals(0.9, r.getLowerBound(), EPSILON); assertEquals(3.1, r.getUpperBound(), EPSILON); }
Example 7
Source File: ClusteredXYBarRendererTest.java From SIMVA-SoS with Apache License 2.0 | 6 votes |
/** * Creates a sample dataset for testing. * * @return A sample dataset. */ public DefaultIntervalXYDataset createSampleDataset1() { DefaultIntervalXYDataset d = new DefaultIntervalXYDataset(); double[] x1 = new double[] {1.0, 2.0, 3.0}; double[] x1Start = new double[] {0.9, 1.9, 2.9}; double[] x1End = new double[] {1.1, 2.1, 3.1}; double[] y1 = new double[] {4.0, 5.0, 6.0}; double[] y1Start = new double[] {1.09, 2.09, 3.09}; double[] y1End = new double[] {1.11, 2.11, 3.11}; double[][] data1 = new double[][] {x1, x1Start, x1End, y1, y1Start, y1End}; d.addSeries("S1", data1); double[] x2 = new double[] {11.0, 12.0, 13.0}; double[] x2Start = new double[] {10.9, 11.9, 12.9}; double[] x2End = new double[] {11.1, 12.1, 13.1}; double[] y2 = new double[] {14.0, 15.0, 16.0}; double[] y2Start = new double[] {11.09, 12.09, 13.09}; double[] y2End = new double[] {11.11, 12.11, 13.11}; double[][] data2 = new double[][] {x2, x2Start, x2End, y2, y2Start, y2End}; d.addSeries("S2", data2); return d; }
Example 8
Source File: DatasetUtilitiesTest.java From buffer_bci with GNU General Public License v3.0 | 6 votes |
/** * This test checks that the standard method has 'includeInterval' * defaulting to true. */ @Test public void testFindDomainBounds2() { DefaultIntervalXYDataset dataset = new DefaultIntervalXYDataset(); double[] x1 = new double[] {1.0, 2.0, 3.0}; double[] x1Start = new double[] {0.9, 1.9, 2.9}; double[] x1End = new double[] {1.1, 2.1, 3.1}; double[] y1 = new double[] {4.0, 5.0, 6.0}; double[] y1Start = new double[] {1.09, 2.09, 3.09}; double[] y1End = new double[] {1.11, 2.11, 3.11}; double[][] data1 = new double[][] {x1, x1Start, x1End, y1, y1Start, y1End}; dataset.addSeries("S1", data1); Range r = DatasetUtilities.findDomainBounds(dataset); assertEquals(0.9, r.getLowerBound(), EPSILON); assertEquals(3.1, r.getUpperBound(), EPSILON); }
Example 9
Source File: DatasetUtilitiesTest.java From ccu-historian with GNU General Public License v3.0 | 6 votes |
/** * Check that NaN values in the IntervalXYDataset are ignored. */ @Test public void testIterateDomainBounds_NaN2() { DefaultIntervalXYDataset dataset = new DefaultIntervalXYDataset(); double[] x1 = new double[] {Double.NaN, 2.0, 3.0}; double[] x1Start = new double[] {0.9, Double.NaN, 2.9}; double[] x1End = new double[] {1.1, Double.NaN, 3.1}; double[] y1 = new double[] {4.0, 5.0, 6.0}; double[] y1Start = new double[] {1.09, 2.09, 3.09}; double[] y1End = new double[] {1.11, 2.11, 3.11}; double[][] data1 = new double[][] {x1, x1Start, x1End, y1, y1Start, y1End}; dataset.addSeries("S1", data1); Range r = DatasetUtilities.iterateDomainBounds(dataset, false); assertEquals(2.0, r.getLowerBound(), EPSILON); assertEquals(3.0, r.getUpperBound(), EPSILON); r = DatasetUtilities.iterateDomainBounds(dataset, true); assertEquals(0.9, r.getLowerBound(), EPSILON); assertEquals(3.1, r.getUpperBound(), EPSILON); }
Example 10
Source File: XYBarRendererTest.java From openstock with GNU General Public License v3.0 | 6 votes |
/** * A simple test for the findRangeBounds() method. */ @Test public void testFindRangeBounds() { DefaultIntervalXYDataset dataset = new DefaultIntervalXYDataset(); double[] x = {1.0, 2.0, 3.0, 4.0}; double[] startx = {0.9, 1.8, 2.7, 3.6}; double[] endx = {1.1, 2.2, 3.3, 4.4}; double[] y = {1.0, 2.0, 3.0, 4.0}; double[] starty = {0.9, 1.8, 2.7, 3.6}; double[] endy = {1.1, 2.2, 3.3, 4.4}; double[][] data = new double[][] {x, startx, endx, y, starty, endy}; dataset.addSeries("Series 1", data); XYBarRenderer renderer = new XYBarRenderer(); renderer.setUseYInterval(true); Range r = renderer.findRangeBounds(dataset); assertEquals(0.9, r.getLowerBound(), EPSILON); assertEquals(4.4, r.getUpperBound(), EPSILON); renderer.setUseYInterval(false); r = renderer.findRangeBounds(dataset); assertEquals(1.0, r.getLowerBound(), EPSILON); assertEquals(4.0, r.getUpperBound(), EPSILON); }
Example 11
Source File: DatasetUtilitiesTest.java From ccu-historian with GNU General Public License v3.0 | 6 votes |
/** * This test checks that when the 'includeInterval' flag is false, the * bounds come from the regular x-values. */ @Test public void testFindDomainBounds3() { DefaultIntervalXYDataset dataset = new DefaultIntervalXYDataset(); double[] x1 = new double[] {1.0, 2.0, 3.0}; double[] x1Start = new double[] {0.9, 1.9, 2.9}; double[] x1End = new double[] {1.1, 2.1, 3.1}; double[] y1 = new double[] {4.0, 5.0, 6.0}; double[] y1Start = new double[] {1.09, 2.09, 3.09}; double[] y1End = new double[] {1.11, 2.11, 3.11}; double[][] data1 = new double[][] {x1, x1Start, x1End, y1, y1Start, y1End}; dataset.addSeries("S1", data1); Range r = DatasetUtilities.findDomainBounds(dataset, false); assertEquals(1.0, r.getLowerBound(), EPSILON); assertEquals(3.0, r.getUpperBound(), EPSILON); }
Example 12
Source File: DatasetUtilitiesTests.java From astor with GNU General Public License v2.0 | 6 votes |
/** * Check that NaN values in the IntervalXYDataset are ignored. */ public void testIterateDomainBounds_NaN2() { DefaultIntervalXYDataset dataset = new DefaultIntervalXYDataset(); double[] x1 = new double[] {Double.NaN, 2.0, 3.0}; double[] x1Start = new double[] {0.9, Double.NaN, 2.9}; double[] x1End = new double[] {1.1, Double.NaN, 3.1}; double[] y1 = new double[] {4.0, 5.0, 6.0}; double[] y1Start = new double[] {1.09, 2.09, 3.09}; double[] y1End = new double[] {1.11, 2.11, 3.11}; double[][] data1 = new double[][] {x1, x1Start, x1End, y1, y1Start, y1End}; dataset.addSeries("S1", data1); Range r = DatasetUtilities.iterateDomainBounds(dataset, false); assertEquals(2.0, r.getLowerBound(), EPSILON); assertEquals(3.0, r.getUpperBound(), EPSILON); r = DatasetUtilities.iterateDomainBounds(dataset, true); assertEquals(0.9, r.getLowerBound(), EPSILON); assertEquals(3.1, r.getUpperBound(), EPSILON); }
Example 13
Source File: DatasetUtilitiesTest.java From ECG-Viewer with GNU General Public License v2.0 | 6 votes |
/** * Check that NaN values in the IntervalXYDataset are ignored. */ @Test public void testIterateDomainBounds_NaN2() { DefaultIntervalXYDataset dataset = new DefaultIntervalXYDataset(); double[] x1 = new double[] {Double.NaN, 2.0, 3.0}; double[] x1Start = new double[] {0.9, Double.NaN, 2.9}; double[] x1End = new double[] {1.1, Double.NaN, 3.1}; double[] y1 = new double[] {4.0, 5.0, 6.0}; double[] y1Start = new double[] {1.09, 2.09, 3.09}; double[] y1End = new double[] {1.11, 2.11, 3.11}; double[][] data1 = new double[][] {x1, x1Start, x1End, y1, y1Start, y1End}; dataset.addSeries("S1", data1); Range r = DatasetUtilities.iterateDomainBounds(dataset, false); assertEquals(2.0, r.getLowerBound(), EPSILON); assertEquals(3.0, r.getUpperBound(), EPSILON); r = DatasetUtilities.iterateDomainBounds(dataset, true); assertEquals(0.9, r.getLowerBound(), EPSILON); assertEquals(3.1, r.getUpperBound(), EPSILON); }
Example 14
Source File: DatasetUtilitiesTest.java From ECG-Viewer with GNU General Public License v2.0 | 6 votes |
/** * This test checks that when the 'includeInterval' flag is false, the * bounds come from the regular x-values. */ @Test public void testFindDomainBounds3() { DefaultIntervalXYDataset dataset = new DefaultIntervalXYDataset(); double[] x1 = new double[] {1.0, 2.0, 3.0}; double[] x1Start = new double[] {0.9, 1.9, 2.9}; double[] x1End = new double[] {1.1, 2.1, 3.1}; double[] y1 = new double[] {4.0, 5.0, 6.0}; double[] y1Start = new double[] {1.09, 2.09, 3.09}; double[] y1End = new double[] {1.11, 2.11, 3.11}; double[][] data1 = new double[][] {x1, x1Start, x1End, y1, y1Start, y1End}; dataset.addSeries("S1", data1); Range r = DatasetUtilities.findDomainBounds(dataset, false); assertEquals(1.0, r.getLowerBound(), EPSILON); assertEquals(3.0, r.getUpperBound(), EPSILON); }
Example 15
Source File: ClusteredXYBarRendererTests.java From astor with GNU General Public License v2.0 | 6 votes |
/** * Creates a sample dataset for testing. * * @return A sample dataset. */ public DefaultIntervalXYDataset createSampleDataset1() { DefaultIntervalXYDataset d = new DefaultIntervalXYDataset(); double[] x1 = new double[] {1.0, 2.0, 3.0}; double[] x1Start = new double[] {0.9, 1.9, 2.9}; double[] x1End = new double[] {1.1, 2.1, 3.1}; double[] y1 = new double[] {4.0, 5.0, 6.0}; double[] y1Start = new double[] {1.09, 2.09, 3.09}; double[] y1End = new double[] {1.11, 2.11, 3.11}; double[][] data1 = new double[][] {x1, x1Start, x1End, y1, y1Start, y1End}; d.addSeries("S1", data1); double[] x2 = new double[] {11.0, 12.0, 13.0}; double[] x2Start = new double[] {10.9, 11.9, 12.9}; double[] x2End = new double[] {11.1, 12.1, 13.1}; double[] y2 = new double[] {14.0, 15.0, 16.0}; double[] y2Start = new double[] {11.09, 12.09, 13.09}; double[] y2End = new double[] {11.11, 12.11, 13.11}; double[][] data2 = new double[][] {x2, x2Start, x2End, y2, y2Start, y2End}; d.addSeries("S2", data2); return d; }
Example 16
Source File: DatasetUtilitiesTest.java From openstock with GNU General Public License v3.0 | 6 votes |
/** * This test checks that when the 'includeInterval' flag is false, the * bounds come from the regular x-values. */ @Test public void testFindDomainBounds3() { DefaultIntervalXYDataset dataset = new DefaultIntervalXYDataset(); double[] x1 = new double[] {1.0, 2.0, 3.0}; double[] x1Start = new double[] {0.9, 1.9, 2.9}; double[] x1End = new double[] {1.1, 2.1, 3.1}; double[] y1 = new double[] {4.0, 5.0, 6.0}; double[] y1Start = new double[] {1.09, 2.09, 3.09}; double[] y1End = new double[] {1.11, 2.11, 3.11}; double[][] data1 = new double[][] {x1, x1Start, x1End, y1, y1Start, y1End}; dataset.addSeries("S1", data1); Range r = DatasetUtilities.findDomainBounds(dataset, false); assertEquals(1.0, r.getLowerBound(), EPSILON); assertEquals(3.0, r.getUpperBound(), EPSILON); }
Example 17
Source File: DatasetUtilitiesTest.java From openstock with GNU General Public License v3.0 | 6 votes |
/** * This test checks that the standard method has 'includeInterval' * defaulting to true. */ @Test public void testFindDomainBounds2() { DefaultIntervalXYDataset dataset = new DefaultIntervalXYDataset(); double[] x1 = new double[] {1.0, 2.0, 3.0}; double[] x1Start = new double[] {0.9, 1.9, 2.9}; double[] x1End = new double[] {1.1, 2.1, 3.1}; double[] y1 = new double[] {4.0, 5.0, 6.0}; double[] y1Start = new double[] {1.09, 2.09, 3.09}; double[] y1End = new double[] {1.11, 2.11, 3.11}; double[][] data1 = new double[][] {x1, x1Start, x1End, y1, y1Start, y1End}; dataset.addSeries("S1", data1); Range r = DatasetUtilities.findDomainBounds(dataset); assertEquals(0.9, r.getLowerBound(), EPSILON); assertEquals(3.1, r.getUpperBound(), EPSILON); }
Example 18
Source File: XYBarRendererTests.java From astor with GNU General Public License v2.0 | 6 votes |
/** * A simple test for the findRangeBounds() method. */ public void testFindRangeBounds() { DefaultIntervalXYDataset dataset = new DefaultIntervalXYDataset(); double[] x = {1.0, 2.0, 3.0, 4.0}; double[] startx = {0.9, 1.8, 2.7, 3.6}; double[] endx = {1.1, 2.2, 3.3, 4.4}; double[] y = {1.0, 2.0, 3.0, 4.0}; double[] starty = {0.9, 1.8, 2.7, 3.6}; double[] endy = {1.1, 2.2, 3.3, 4.4}; double[][] data = new double[][] {x, startx, endx, y, starty, endy}; dataset.addSeries("Series 1", data); XYBarRenderer renderer = new XYBarRenderer(); renderer.setUseYInterval(true); Range r = renderer.findRangeBounds(dataset); assertEquals(0.9, r.getLowerBound(), EPSILON); assertEquals(4.4, r.getUpperBound(), EPSILON); renderer.setUseYInterval(false); r = renderer.findRangeBounds(dataset); assertEquals(1.0, r.getLowerBound(), EPSILON); assertEquals(4.0, r.getUpperBound(), EPSILON); }
Example 19
Source File: LegacyChartType.java From pentaho-reporting with GNU Lesser General Public License v2.1 | 5 votes |
private XYDataset createIntervalXYDataset() { final DefaultIntervalXYDataset dataset = new DefaultIntervalXYDataset(); dataset.addSeries( "First", new double[][] { { 1, 2, 3 }, { 3, 1, 2 }, { 1, 2, 1 }, { 4, 4, 4 }, { 3, 3, 3 }, { 4, 4, 4 }, } );// NON-NLS // dataset.addSeries("Second", new double[][]{{1, 2, 3}, {3, 0, 1}, {1, 2, // 3}, {3, 0, 1}, {1, 2, 3}, {3, 0, 1}, });//NON-NLS return dataset; }
Example 20
Source File: ChartDatasetFactory.java From rapidminer-studio with GNU Affero General Public License v3.0 | 4 votes |
/** * Creates a dataset which supports custom intervals on both axes. * * Expects a grouping on the domain axis. * * @throws ChartPlottimeException */ public static DefaultIntervalXYDataset createDefaultIntervalXYDataset(ValueSource valueSource, PlotInstance plotInstance, boolean createRangeIntervals) throws ChartPlottimeException { ValueSourceData valueSourceData = plotInstance.getPlotData().getValueSourceData(valueSource); assertMaxValueCountNotExceededOrThrowException(valueSourceData); GroupCellSeriesData dataForAllGroupCells = valueSourceData.getSeriesDataForAllGroupCells(); DefaultIntervalXYDataset intervalDataset = new DefaultIntervalXYDataset(); DefaultDimensionConfig domainConfig = valueSource.getDomainConfig(); DimensionConfigData domainConfigData = plotInstance.getPlotData().getDimensionConfigData(domainConfig); // Loop all group cells and add data to dataset for (GroupCellKeyAndData groupCellKeyAndData : dataForAllGroupCells) { GroupCellKey groupCellKey = groupCellKeyAndData.getKey(); GroupCellData groupCellData = groupCellKeyAndData.getData(); // create series name GroupCellKey groupCellKeyClone = (GroupCellKey) groupCellKey.clone(); groupCellKeyClone.removeRangeForDimension(PlotDimension.DOMAIN); // legend does not need // X-group String seriesName = generateSeriesName(valueSource, groupCellKeyClone, plotInstance.getCurrentPlotConfigurationClone()); List<ValueRange> domainValueGroups = domainConfigData.getGroupingModel(); // Loop all rows and add data to series. // Remember that by definition one row in the groupCellData corresponds // to one group in xValueGroups (if the x-axis is grouped, which should // always be the case in this function). final int domainValueIdx = 0; final int domainLowerIdx = 1; final int domainUpperIdx = 2; final int rangeValueIdx = 3; final int rangeLowerIdx = 4; final int rangeUpperIdx = 5; Map<PlotDimension, double[]> dataForMainSeries = groupCellData.getDataForUsageType(SeriesUsageType.MAIN_SERIES); int rowCount = dataForMainSeries.get(PlotDimension.DOMAIN).length; double[] domainValues = dataForMainSeries.get(PlotDimension.DOMAIN); double[] rangeValues = dataForMainSeries.get(PlotDimension.VALUE); double[] upperErrorValues = null; double[] lowerErrorValues = null; upperErrorValues = valueSourceData.getAbsoluteUtilityValues(groupCellKeyAndData, true); lowerErrorValues = valueSourceData.getAbsoluteUtilityValues(groupCellKeyAndData, false); if (createRangeIntervals && upperErrorValues == null) { throw new ChartPlottimeException("undefined_series", valueSource.toString(), SeriesUsageType.INDICATOR_1); } double[][] series = new double[6][rowCount]; Iterator<ValueRange> domainGroupIterator = null; if (domainValueGroups != null) { domainGroupIterator = domainValueGroups.iterator(); } double domainLower; double domainUpper; double domainValue; double rangeValue; double rangeUpper; double rangeLower; for (int row = 0; row < rowCount; ++row) { domainValue = domainValues[row]; domainLower = domainValue; domainUpper = domainValue; if (domainGroupIterator != null) { ValueRange currentDomainGroup = domainGroupIterator.next(); if (currentDomainGroup.definesUpperLowerBound()) { domainLower = currentDomainGroup.getLowerBound(); domainUpper = currentDomainGroup.getUpperBound(); } } rangeValue = rangeValues[row]; rangeUpper = upperErrorValues != null ? upperErrorValues[row] : Double.NaN; rangeLower = lowerErrorValues != null ? lowerErrorValues[row] : Double.NaN; series[domainValueIdx][row] = domainValue; series[domainLowerIdx][row] = domainLower; series[domainUpperIdx][row] = domainUpper; series[rangeValueIdx][row] = rangeValue; series[rangeLowerIdx][row] = rangeLower; series[rangeUpperIdx][row] = rangeUpper; } intervalDataset.addSeries(seriesName, series); } return intervalDataset; }