org.jfree.data.statistics.DefaultStatisticalCategoryDataset Java Examples
The following examples show how to use
org.jfree.data.statistics.DefaultStatisticalCategoryDataset.
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: StatisticalLineAndShapeRendererTest.java From openstock with GNU General Public License v3.0 | 6 votes |
/** * Draws the chart with a <code>null</code> info object to make sure that * no exceptions are thrown (particularly by code in the renderer). */ @Test public void testDrawWithNullInfo() { try { DefaultStatisticalCategoryDataset dataset = new DefaultStatisticalCategoryDataset(); dataset.add(1.0, 2.0, "S1", "C1"); dataset.add(3.0, 4.0, "S1", "C2"); CategoryPlot plot = new CategoryPlot(dataset, new CategoryAxis("Category"), new NumberAxis("Value"), new StatisticalLineAndShapeRenderer()); JFreeChart chart = new JFreeChart(plot); /* BufferedImage image = */ chart.createBufferedImage(300, 200, null); } catch (NullPointerException e) { fail("No exception should be thrown."); } }
Example #2
Source File: StatisticalBarRendererTest.java From openstock with GNU General Public License v3.0 | 6 votes |
/** * Draws the chart with a <code>null</code> standard deviation to make sure * that no exceptions are thrown (particularly by code in the renderer). * See bug report 1779941. */ @Test public void testDrawWithNullDeviationHorizontal() { try { DefaultStatisticalCategoryDataset dataset = new DefaultStatisticalCategoryDataset(); dataset.add(1.0, 2.0, "S1", "C1"); dataset.add(new Double(4.0), null, "S1", "C2"); CategoryPlot plot = new CategoryPlot(dataset, new CategoryAxis("Category"), new NumberAxis("Value"), new StatisticalBarRenderer()); plot.setOrientation(PlotOrientation.HORIZONTAL); JFreeChart chart = new JFreeChart(plot); /* BufferedImage image = */ chart.createBufferedImage(300, 200, null); } catch (NullPointerException e) { fail("No exception should be thrown."); } }
Example #3
Source File: StatisticalBarRendererTest.java From buffer_bci with GNU General Public License v3.0 | 6 votes |
/** * Draws the chart with a <code>null</code> standard deviation to make sure * that no exceptions are thrown (particularly by code in the renderer). * See bug report 1779941. */ @Test public void testDrawWithNullDeviationHorizontal() { try { DefaultStatisticalCategoryDataset dataset = new DefaultStatisticalCategoryDataset(); dataset.add(1.0, 2.0, "S1", "C1"); dataset.add(new Double(4.0), null, "S1", "C2"); CategoryPlot plot = new CategoryPlot(dataset, new CategoryAxis("Category"), new NumberAxis("Value"), new StatisticalBarRenderer()); plot.setOrientation(PlotOrientation.HORIZONTAL); JFreeChart chart = new JFreeChart(plot); /* BufferedImage image = */ chart.createBufferedImage(300, 200, null); } catch (NullPointerException e) { fail("No exception should be thrown."); } }
Example #4
Source File: StatisticalLineAndShapeRendererTest.java From ccu-historian with GNU General Public License v3.0 | 6 votes |
/** * Draws the chart with a <code>null</code> info object to make sure that * no exceptions are thrown (particularly by code in the renderer). */ @Test public void testDrawWithNullInfo() { try { DefaultStatisticalCategoryDataset dataset = new DefaultStatisticalCategoryDataset(); dataset.add(1.0, 2.0, "S1", "C1"); dataset.add(3.0, 4.0, "S1", "C2"); CategoryPlot plot = new CategoryPlot(dataset, new CategoryAxis("Category"), new NumberAxis("Value"), new StatisticalLineAndShapeRenderer()); JFreeChart chart = new JFreeChart(plot); /* BufferedImage image = */ chart.createBufferedImage(300, 200, null); } catch (NullPointerException e) { fail("No exception should be thrown."); } }
Example #5
Source File: DatasetUtilitiesTest.java From openstock with GNU General Public License v3.0 | 6 votes |
/** * Some checks for the iterateToFindRangeBounds(CategoryDataset...) * method. */ @Test public void testIterateToFindRangeBounds_StatisticalCategoryDataset() { DefaultStatisticalCategoryDataset dataset = new DefaultStatisticalCategoryDataset(); List visibleSeriesKeys = new ArrayList(); assertNull(DatasetUtilities.iterateToFindRangeBounds(dataset, visibleSeriesKeys, false)); dataset.add(1.0, 0.5, "R1", "C1"); visibleSeriesKeys.add("R1"); assertEquals(new Range(1.0, 1.0), DatasetUtilities.iterateToFindRangeBounds(dataset, visibleSeriesKeys, false)); assertEquals(new Range(0.5, 1.5), DatasetUtilities.iterateToFindRangeBounds(dataset, visibleSeriesKeys, true)); }
Example #6
Source File: StatisticalBarRendererTest.java From SIMVA-SoS with Apache License 2.0 | 6 votes |
/** * Draws the chart with a <code>null</code> standard deviation to make sure * that no exceptions are thrown (particularly by code in the renderer). * See bug report 1779941. */ @Test public void testDrawWithNullDeviationHorizontal() { try { DefaultStatisticalCategoryDataset dataset = new DefaultStatisticalCategoryDataset(); dataset.add(1.0, 2.0, "S1", "C1"); dataset.add(new Double(4.0), null, "S1", "C2"); CategoryPlot plot = new CategoryPlot(dataset, new CategoryAxis("Category"), new NumberAxis("Value"), new StatisticalBarRenderer()); plot.setOrientation(PlotOrientation.HORIZONTAL); JFreeChart chart = new JFreeChart(plot); /* BufferedImage image = */ chart.createBufferedImage(300, 200, null); } catch (NullPointerException e) { fail("No exception should be thrown."); } }
Example #7
Source File: StatisticalBarRendererTest.java From buffer_bci with GNU General Public License v3.0 | 6 votes |
/** * Draws the chart with a <code>null</code> mean value to make sure that * no exceptions are thrown (particularly by code in the renderer). See * bug report 1779941. */ @Test public void testDrawWithNullMeanVertical() { try { DefaultStatisticalCategoryDataset dataset = new DefaultStatisticalCategoryDataset(); dataset.add(1.0, 2.0, "S1", "C1"); dataset.add(null, new Double(4.0), "S1", "C2"); CategoryPlot plot = new CategoryPlot(dataset, new CategoryAxis("Category"), new NumberAxis("Value"), new StatisticalBarRenderer()); JFreeChart chart = new JFreeChart(plot); /* BufferedImage image = */ chart.createBufferedImage(300, 200, null); } catch (NullPointerException e) { fail("No exception should be thrown."); } }
Example #8
Source File: DatasetUtilitiesTest.java From SIMVA-SoS with Apache License 2.0 | 6 votes |
/** * Some checks for the iterateToFindRangeBounds(CategoryDataset...) * method. */ @Test public void testIterateToFindRangeBounds_StatisticalCategoryDataset() { DefaultStatisticalCategoryDataset dataset = new DefaultStatisticalCategoryDataset(); List visibleSeriesKeys = new ArrayList(); assertNull(DatasetUtilities.iterateToFindRangeBounds(dataset, visibleSeriesKeys, false)); dataset.add(1.0, 0.5, "R1", "C1"); visibleSeriesKeys.add("R1"); assertEquals(new Range(1.0, 1.0), DatasetUtilities.iterateToFindRangeBounds(dataset, visibleSeriesKeys, false)); assertEquals(new Range(0.5, 1.5), DatasetUtilities.iterateToFindRangeBounds(dataset, visibleSeriesKeys, true)); }
Example #9
Source File: StatisticalBarRendererTest.java From buffer_bci with GNU General Public License v3.0 | 6 votes |
/** * Draws the chart with a <code>null</code> info object to make sure that * no exceptions are thrown (particularly by code in the renderer). */ @Test public void testDrawWithNullInfo() { try { DefaultStatisticalCategoryDataset dataset = new DefaultStatisticalCategoryDataset(); dataset.add(1.0, 2.0, "S1", "C1"); dataset.add(3.0, 4.0, "S1", "C2"); CategoryPlot plot = new CategoryPlot(dataset, new CategoryAxis("Category"), new NumberAxis("Value"), new StatisticalBarRenderer()); JFreeChart chart = new JFreeChart(plot); /* BufferedImage image = */ chart.createBufferedImage(300, 200, null); } catch (NullPointerException e) { fail("No exception should be thrown."); } }
Example #10
Source File: StatisticalLineAndShapeRendererTest.java From ECG-Viewer with GNU General Public License v2.0 | 6 votes |
/** * Draws the chart with a <code>null</code> info object to make sure that * no exceptions are thrown (particularly by code in the renderer). */ @Test public void testDrawWithNullInfo() { try { DefaultStatisticalCategoryDataset dataset = new DefaultStatisticalCategoryDataset(); dataset.add(1.0, 2.0, "S1", "C1"); dataset.add(3.0, 4.0, "S1", "C2"); CategoryPlot plot = new CategoryPlot(dataset, new CategoryAxis("Category"), new NumberAxis("Value"), new StatisticalLineAndShapeRenderer()); JFreeChart chart = new JFreeChart(plot); /* BufferedImage image = */ chart.createBufferedImage(300, 200, null); } catch (NullPointerException e) { fail("No exception should be thrown."); } }
Example #11
Source File: StatisticalBarRendererTest.java From ECG-Viewer with GNU General Public License v2.0 | 6 votes |
/** * Draws the chart with a <code>null</code> info object to make sure that * no exceptions are thrown (particularly by code in the renderer). */ @Test public void testDrawWithNullInfo() { try { DefaultStatisticalCategoryDataset dataset = new DefaultStatisticalCategoryDataset(); dataset.add(1.0, 2.0, "S1", "C1"); dataset.add(3.0, 4.0, "S1", "C2"); CategoryPlot plot = new CategoryPlot(dataset, new CategoryAxis("Category"), new NumberAxis("Value"), new StatisticalBarRenderer()); JFreeChart chart = new JFreeChart(plot); /* BufferedImage image = */ chart.createBufferedImage(300, 200, null); } catch (NullPointerException e) { fail("No exception should be thrown."); } }
Example #12
Source File: StatisticalBarRendererTest.java From ECG-Viewer with GNU General Public License v2.0 | 6 votes |
/** * Draws the chart with a <code>null</code> mean value to make sure that * no exceptions are thrown (particularly by code in the renderer). See * bug report 1779941. */ @Test public void testDrawWithNullMeanVertical() { try { DefaultStatisticalCategoryDataset dataset = new DefaultStatisticalCategoryDataset(); dataset.add(1.0, 2.0, "S1", "C1"); dataset.add(null, new Double(4.0), "S1", "C2"); CategoryPlot plot = new CategoryPlot(dataset, new CategoryAxis("Category"), new NumberAxis("Value"), new StatisticalBarRenderer()); JFreeChart chart = new JFreeChart(plot); /* BufferedImage image = */ chart.createBufferedImage(300, 200, null); } catch (NullPointerException e) { fail("No exception should be thrown."); } }
Example #13
Source File: StatisticalBarRendererTest.java From ECG-Viewer with GNU General Public License v2.0 | 6 votes |
/** * Draws the chart with a <code>null</code> mean value to make sure that * no exceptions are thrown (particularly by code in the renderer). See * bug report 1779941. */ @Test public void testDrawWithNullMeanHorizontal() { try { DefaultStatisticalCategoryDataset dataset = new DefaultStatisticalCategoryDataset(); dataset.add(1.0, 2.0, "S1", "C1"); dataset.add(null, new Double(4.0), "S1", "C2"); CategoryPlot plot = new CategoryPlot(dataset, new CategoryAxis("Category"), new NumberAxis("Value"), new StatisticalBarRenderer()); plot.setOrientation(PlotOrientation.HORIZONTAL); JFreeChart chart = new JFreeChart(plot); /* BufferedImage image = */ chart.createBufferedImage(300, 200, null); } catch (NullPointerException e) { fail("No exception should be thrown."); } }
Example #14
Source File: StatisticalBarRendererTest.java From ECG-Viewer with GNU General Public License v2.0 | 6 votes |
/** * Draws the chart with a <code>null</code> standard deviation to make sure * that no exceptions are thrown (particularly by code in the renderer). * See bug report 1779941. */ @Test public void testDrawWithNullDeviationVertical() { try { DefaultStatisticalCategoryDataset dataset = new DefaultStatisticalCategoryDataset(); dataset.add(1.0, 2.0, "S1", "C1"); dataset.add(new Double(4.0), null, "S1", "C2"); CategoryPlot plot = new CategoryPlot(dataset, new CategoryAxis("Category"), new NumberAxis("Value"), new StatisticalBarRenderer()); JFreeChart chart = new JFreeChart(plot); /* BufferedImage image = */ chart.createBufferedImage(300, 200, null); } catch (NullPointerException e) { fail("No exception should be thrown."); } }
Example #15
Source File: StatisticalBarRendererTest.java From ECG-Viewer with GNU General Public License v2.0 | 6 votes |
/** * Draws the chart with a <code>null</code> standard deviation to make sure * that no exceptions are thrown (particularly by code in the renderer). * See bug report 1779941. */ @Test public void testDrawWithNullDeviationHorizontal() { try { DefaultStatisticalCategoryDataset dataset = new DefaultStatisticalCategoryDataset(); dataset.add(1.0, 2.0, "S1", "C1"); dataset.add(new Double(4.0), null, "S1", "C2"); CategoryPlot plot = new CategoryPlot(dataset, new CategoryAxis("Category"), new NumberAxis("Value"), new StatisticalBarRenderer()); plot.setOrientation(PlotOrientation.HORIZONTAL); JFreeChart chart = new JFreeChart(plot); /* BufferedImage image = */ chart.createBufferedImage(300, 200, null); } catch (NullPointerException e) { fail("No exception should be thrown."); } }
Example #16
Source File: StatisticalLineAndShapeRendererTest.java From buffer_bci with GNU General Public License v3.0 | 6 votes |
/** * Draws the chart with a <code>null</code> info object to make sure that * no exceptions are thrown (particularly by code in the renderer). */ @Test public void testDrawWithNullInfo() { try { DefaultStatisticalCategoryDataset dataset = new DefaultStatisticalCategoryDataset(); dataset.add(1.0, 2.0, "S1", "C1"); dataset.add(3.0, 4.0, "S1", "C2"); CategoryPlot plot = new CategoryPlot(dataset, new CategoryAxis("Category"), new NumberAxis("Value"), new StatisticalLineAndShapeRenderer()); JFreeChart chart = new JFreeChart(plot); /* BufferedImage image = */ chart.createBufferedImage(300, 200, null); } catch (NullPointerException e) { fail("No exception should be thrown."); } }
Example #17
Source File: DatasetUtilitiesTest.java From ECG-Viewer with GNU General Public License v2.0 | 6 votes |
/** * Some checks for the iterateToFindRangeBounds(CategoryDataset...) * method. */ @Test public void testIterateToFindRangeBounds_StatisticalCategoryDataset() { DefaultStatisticalCategoryDataset dataset = new DefaultStatisticalCategoryDataset(); List visibleSeriesKeys = new ArrayList(); assertNull(DatasetUtilities.iterateToFindRangeBounds(dataset, visibleSeriesKeys, false)); dataset.add(1.0, 0.5, "R1", "C1"); visibleSeriesKeys.add("R1"); assertEquals(new Range(1.0, 1.0), DatasetUtilities.iterateToFindRangeBounds(dataset, visibleSeriesKeys, false)); assertEquals(new Range(0.5, 1.5), DatasetUtilities.iterateToFindRangeBounds(dataset, visibleSeriesKeys, true)); }
Example #18
Source File: StatisticalLineAndShapeRendererTests.java From astor with GNU General Public License v2.0 | 6 votes |
/** * Draws the chart with a <code>null</code> info object to make sure that * no exceptions are thrown (particularly by code in the renderer). */ public void testDrawWithNullInfo() { boolean success = false; try { DefaultStatisticalCategoryDataset dataset = new DefaultStatisticalCategoryDataset(); dataset.add(1.0, 2.0, "S1", "C1"); dataset.add(3.0, 4.0, "S1", "C2"); CategoryPlot plot = new CategoryPlot(dataset, new CategoryAxis("Category"), new NumberAxis("Value"), new StatisticalLineAndShapeRenderer()); JFreeChart chart = new JFreeChart(plot); /* BufferedImage image = */ chart.createBufferedImage(300, 200, null); success = true; } catch (NullPointerException e) { e.printStackTrace(); success = false; } assertTrue(success); }
Example #19
Source File: StatisticalBarRendererTests.java From astor with GNU General Public License v2.0 | 6 votes |
/** * Draws the chart with a <code>null</code> info object to make sure that * no exceptions are thrown (particularly by code in the renderer). */ public void testDrawWithNullInfo() { boolean success = false; try { DefaultStatisticalCategoryDataset dataset = new DefaultStatisticalCategoryDataset(); dataset.add(1.0, 2.0, "S1", "C1"); dataset.add(3.0, 4.0, "S1", "C2"); CategoryPlot plot = new CategoryPlot(dataset, new CategoryAxis("Category"), new NumberAxis("Value"), new StatisticalBarRenderer()); JFreeChart chart = new JFreeChart(plot); /* BufferedImage image = */ chart.createBufferedImage(300, 200, null); success = true; } catch (NullPointerException e) { e.printStackTrace(); success = false; } assertTrue(success); }
Example #20
Source File: StatisticalBarRendererTests.java From astor with GNU General Public License v2.0 | 6 votes |
/** * Draws the chart with a <code>null</code> mean value to make sure that * no exceptions are thrown (particularly by code in the renderer). See * bug report 1779941. */ public void testDrawWithNullMeanVertical() { boolean success = false; try { DefaultStatisticalCategoryDataset dataset = new DefaultStatisticalCategoryDataset(); dataset.add(1.0, 2.0, "S1", "C1"); dataset.add(null, new Double(4.0), "S1", "C2"); CategoryPlot plot = new CategoryPlot(dataset, new CategoryAxis("Category"), new NumberAxis("Value"), new StatisticalBarRenderer()); JFreeChart chart = new JFreeChart(plot); /* BufferedImage image = */ chart.createBufferedImage(300, 200, null); success = true; } catch (NullPointerException e) { e.printStackTrace(); success = false; } assertTrue(success); }
Example #21
Source File: StatisticalBarRendererTests.java From astor with GNU General Public License v2.0 | 6 votes |
/** * Draws the chart with a <code>null</code> mean value to make sure that * no exceptions are thrown (particularly by code in the renderer). See * bug report 1779941. */ public void testDrawWithNullMeanHorizontal() { boolean success = false; try { DefaultStatisticalCategoryDataset dataset = new DefaultStatisticalCategoryDataset(); dataset.add(1.0, 2.0, "S1", "C1"); dataset.add(null, new Double(4.0), "S1", "C2"); CategoryPlot plot = new CategoryPlot(dataset, new CategoryAxis("Category"), new NumberAxis("Value"), new StatisticalBarRenderer()); plot.setOrientation(PlotOrientation.HORIZONTAL); JFreeChart chart = new JFreeChart(plot); /* BufferedImage image = */ chart.createBufferedImage(300, 200, null); success = true; } catch (NullPointerException e) { e.printStackTrace(); success = false; } assertTrue(success); }
Example #22
Source File: StatisticalBarRendererTests.java From astor with GNU General Public License v2.0 | 6 votes |
/** * Draws the chart with a <code>null</code> standard deviation to make sure * that no exceptions are thrown (particularly by code in the renderer). * See bug report 1779941. */ public void testDrawWithNullDeviationVertical() { boolean success = false; try { DefaultStatisticalCategoryDataset dataset = new DefaultStatisticalCategoryDataset(); dataset.add(1.0, 2.0, "S1", "C1"); dataset.add(new Double(4.0), null, "S1", "C2"); CategoryPlot plot = new CategoryPlot(dataset, new CategoryAxis("Category"), new NumberAxis("Value"), new StatisticalBarRenderer()); JFreeChart chart = new JFreeChart(plot); /* BufferedImage image = */ chart.createBufferedImage(300, 200, null); success = true; } catch (NullPointerException e) { e.printStackTrace(); success = false; } assertTrue(success); }
Example #23
Source File: StatisticalBarRendererTests.java From astor with GNU General Public License v2.0 | 6 votes |
/** * Draws the chart with a <code>null</code> standard deviation to make sure * that no exceptions are thrown (particularly by code in the renderer). * See bug report 1779941. */ public void testDrawWithNullDeviationHorizontal() { boolean success = false; try { DefaultStatisticalCategoryDataset dataset = new DefaultStatisticalCategoryDataset(); dataset.add(1.0, 2.0, "S1", "C1"); dataset.add(new Double(4.0), null, "S1", "C2"); CategoryPlot plot = new CategoryPlot(dataset, new CategoryAxis("Category"), new NumberAxis("Value"), new StatisticalBarRenderer()); plot.setOrientation(PlotOrientation.HORIZONTAL); JFreeChart chart = new JFreeChart(plot); /* BufferedImage image = */ chart.createBufferedImage(300, 200, null); success = true; } catch (NullPointerException e) { e.printStackTrace(); success = false; } assertTrue(success); }
Example #24
Source File: DatasetUtilitiesTests.java From astor with GNU General Public License v2.0 | 6 votes |
/** * Some checks for the iterateToFindRangeBounds(CategoryDataset...) * method. */ public void testIterateToFindRangeBounds_StatisticalCategoryDataset() { DefaultStatisticalCategoryDataset dataset = new DefaultStatisticalCategoryDataset(); List visibleSeriesKeys = new ArrayList(); assertNull(DatasetUtilities.iterateToFindRangeBounds(dataset, visibleSeriesKeys, false)); dataset.add(1.0, 0.5, "R1", "C1"); visibleSeriesKeys.add("R1"); assertEquals(new Range(1.0, 1.0), DatasetUtilities.iterateToFindRangeBounds(dataset, visibleSeriesKeys, false)); assertEquals(new Range(0.5, 1.5), DatasetUtilities.iterateToFindRangeBounds(dataset, visibleSeriesKeys, true)); }
Example #25
Source File: StatisticalBarRendererTests.java From astor with GNU General Public License v2.0 | 6 votes |
/** * Draws the chart with a <code>null</code> standard deviation to make sure * that no exceptions are thrown (particularly by code in the renderer). * See bug report 1779941. */ public void testDrawWithNullDeviationHorizontal() { boolean success = false; try { DefaultStatisticalCategoryDataset dataset = new DefaultStatisticalCategoryDataset(); dataset.add(1.0, 2.0, "S1", "C1"); dataset.add(new Double(4.0), null, "S1", "C2"); CategoryPlot plot = new CategoryPlot(dataset, new CategoryAxis("Category"), new NumberAxis("Value"), new StatisticalBarRenderer()); plot.setOrientation(PlotOrientation.HORIZONTAL); JFreeChart chart = new JFreeChart(plot); /* BufferedImage image = */ chart.createBufferedImage(300, 200, null); success = true; } catch (NullPointerException e) { e.printStackTrace(); success = false; } assertTrue(success); }
Example #26
Source File: StatisticalLineAndShapeRendererTests.java From astor with GNU General Public License v2.0 | 6 votes |
/** * Draws the chart with a <code>null</code> info object to make sure that * no exceptions are thrown (particularly by code in the renderer). */ public void testDrawWithNullInfo() { boolean success = false; try { DefaultStatisticalCategoryDataset dataset = new DefaultStatisticalCategoryDataset(); dataset.add(1.0, 2.0, "S1", "C1"); dataset.add(3.0, 4.0, "S1", "C2"); CategoryPlot plot = new CategoryPlot(dataset, new CategoryAxis("Category"), new NumberAxis("Value"), new StatisticalLineAndShapeRenderer()); JFreeChart chart = new JFreeChart(plot); /* BufferedImage image = */ chart.createBufferedImage(300, 200, null); success = true; } catch (NullPointerException e) { e.printStackTrace(); success = false; } assertTrue(success); }
Example #27
Source File: StatisticalBarRendererTests.java From astor with GNU General Public License v2.0 | 6 votes |
/** * Draws the chart with a <code>null</code> info object to make sure that * no exceptions are thrown (particularly by code in the renderer). */ public void testDrawWithNullInfo() { boolean success = false; try { DefaultStatisticalCategoryDataset dataset = new DefaultStatisticalCategoryDataset(); dataset.add(1.0, 2.0, "S1", "C1"); dataset.add(3.0, 4.0, "S1", "C2"); CategoryPlot plot = new CategoryPlot(dataset, new CategoryAxis("Category"), new NumberAxis("Value"), new StatisticalBarRenderer()); JFreeChart chart = new JFreeChart(plot); /* BufferedImage image = */ chart.createBufferedImage(300, 200, null); success = true; } catch (NullPointerException e) { e.printStackTrace(); success = false; } assertTrue(success); }
Example #28
Source File: StatisticalBarRendererTests.java From astor with GNU General Public License v2.0 | 6 votes |
/** * Draws the chart with a <code>null</code> mean value to make sure that * no exceptions are thrown (particularly by code in the renderer). See * bug report 1779941. */ public void testDrawWithNullMeanVertical() { boolean success = false; try { DefaultStatisticalCategoryDataset dataset = new DefaultStatisticalCategoryDataset(); dataset.add(1.0, 2.0, "S1", "C1"); dataset.add(null, new Double(4.0), "S1", "C2"); CategoryPlot plot = new CategoryPlot(dataset, new CategoryAxis("Category"), new NumberAxis("Value"), new StatisticalBarRenderer()); JFreeChart chart = new JFreeChart(plot); /* BufferedImage image = */ chart.createBufferedImage(300, 200, null); success = true; } catch (NullPointerException e) { e.printStackTrace(); success = false; } assertTrue(success); }
Example #29
Source File: StatisticalBarRendererTests.java From astor with GNU General Public License v2.0 | 6 votes |
/** * Draws the chart with a <code>null</code> mean value to make sure that * no exceptions are thrown (particularly by code in the renderer). See * bug report 1779941. */ public void testDrawWithNullMeanHorizontal() { boolean success = false; try { DefaultStatisticalCategoryDataset dataset = new DefaultStatisticalCategoryDataset(); dataset.add(1.0, 2.0, "S1", "C1"); dataset.add(null, new Double(4.0), "S1", "C2"); CategoryPlot plot = new CategoryPlot(dataset, new CategoryAxis("Category"), new NumberAxis("Value"), new StatisticalBarRenderer()); plot.setOrientation(PlotOrientation.HORIZONTAL); JFreeChart chart = new JFreeChart(plot); /* BufferedImage image = */ chart.createBufferedImage(300, 200, null); success = true; } catch (NullPointerException e) { e.printStackTrace(); success = false; } assertTrue(success); }
Example #30
Source File: StatisticalBarRendererTests.java From astor with GNU General Public License v2.0 | 6 votes |
/** * Draws the chart with a <code>null</code> standard deviation to make sure * that no exceptions are thrown (particularly by code in the renderer). * See bug report 1779941. */ public void testDrawWithNullDeviationVertical() { boolean success = false; try { DefaultStatisticalCategoryDataset dataset = new DefaultStatisticalCategoryDataset(); dataset.add(1.0, 2.0, "S1", "C1"); dataset.add(new Double(4.0), null, "S1", "C2"); CategoryPlot plot = new CategoryPlot(dataset, new CategoryAxis("Category"), new NumberAxis("Value"), new StatisticalBarRenderer()); JFreeChart chart = new JFreeChart(plot); /* BufferedImage image = */ chart.createBufferedImage(300, 200, null); success = true; } catch (NullPointerException e) { e.printStackTrace(); success = false; } assertTrue(success); }