@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); }
@Override public Range findRangeBounds(XYDataset dataset) { return findRangeBounds(dataset, this.useYInterval); }
XYBarRenderer extends AbstractXYItemRenderer implements XYItemRenderer, Cloneable, PublicCloneable, Serializable { @Override public Range findRangeBounds(XYDataset dataset) { return findRangeBounds(dataset, this.useYInterval); } }
XYBarRenderer extends AbstractXYItemRenderer implements XYItemRenderer, Cloneable, PublicCloneable, Serializable { @Override public Range findRangeBounds(XYDataset dataset) { return findRangeBounds(dataset, this.useYInterval); } XYBarRenderer();  XYBarRenderer(double margin); }
XYBarRenderer extends AbstractXYItemRenderer implements XYItemRenderer, Cloneable, PublicCloneable, Serializable { @Override public Range findRangeBounds(XYDataset dataset) { return findRangeBounds(dataset, this.useYInterval); } XYBarRenderer();  XYBarRenderer(double margin); static XYBarPainter getDefaultBarPainter(); static void setDefaultBarPainter(XYBarPainter painter); static boolean getDefaultShadowsVisible(); static void setDefaultShadowsVisible(boolean visible); double getBase(); void setBase(double base); boolean getUseYInterval(); void setUseYInterval(boolean use); double getMargin(); void setMargin(double margin); boolean isDrawBarOutline(); void setDrawBarOutline(boolean draw); GradientPaintTransformer getGradientPaintTransformer(); void setGradientPaintTransformer(
            GradientPaintTransformer transformer); ItemLabelPosition getPositiveItemLabelPositionFallback(); void setPositiveItemLabelPositionFallback(
            ItemLabelPosition position); ItemLabelPosition getNegativeItemLabelPositionFallback(); void setNegativeItemLabelPositionFallback(
            ItemLabelPosition position); XYBarPainter getBarPainter(); void setBarPainter(XYBarPainter painter); boolean getShadowsVisible(); void setShadowVisible(boolean visible); double getShadowXOffset(); void setShadowXOffset(double offset); double getShadowYOffset(); void setShadowYOffset(double offset); double getBarAlignmentFactor(); void setBarAlignmentFactor(double factor); @Override XYItemRendererState initialise(Graphics2D g2, Rectangle2D dataArea,
            XYPlot plot, XYDataset dataset, PlotRenderingInfo info); @Override LegendItem getLegendItem(int datasetIndex, int series); @Override void drawItem(Graphics2D g2,
                         XYItemRendererState state,
                         Rectangle2D dataArea,
                         PlotRenderingInfo info,
                         XYPlot plot,
                         ValueAxis domainAxis,
                         ValueAxis rangeAxis,
                         XYDataset dataset,
                         int series,
                         int item,
                         CrosshairState crosshairState,
                         int pass); @Override Range findDomainBounds(XYDataset dataset); @Override Range findRangeBounds(XYDataset dataset); @Override Object clone(); @Override boolean equals(Object obj); }
XYBarRenderer extends AbstractXYItemRenderer implements XYItemRenderer, Cloneable, PublicCloneable, Serializable { @Override public Range findRangeBounds(XYDataset dataset) { return findRangeBounds(dataset, this.useYInterval); } XYBarRenderer();  XYBarRenderer(double margin); static XYBarPainter getDefaultBarPainter(); static void setDefaultBarPainter(XYBarPainter painter); static boolean getDefaultShadowsVisible(); static void setDefaultShadowsVisible(boolean visible); double getBase(); void setBase(double base); boolean getUseYInterval(); void setUseYInterval(boolean use); double getMargin(); void setMargin(double margin); boolean isDrawBarOutline(); void setDrawBarOutline(boolean draw); GradientPaintTransformer getGradientPaintTransformer(); void setGradientPaintTransformer(
            GradientPaintTransformer transformer); ItemLabelPosition getPositiveItemLabelPositionFallback(); void setPositiveItemLabelPositionFallback(
            ItemLabelPosition position); ItemLabelPosition getNegativeItemLabelPositionFallback(); void setNegativeItemLabelPositionFallback(
            ItemLabelPosition position); XYBarPainter getBarPainter(); void setBarPainter(XYBarPainter painter); boolean getShadowsVisible(); void setShadowVisible(boolean visible); double getShadowXOffset(); void setShadowXOffset(double offset); double getShadowYOffset(); void setShadowYOffset(double offset); double getBarAlignmentFactor(); void setBarAlignmentFactor(double factor); @Override XYItemRendererState initialise(Graphics2D g2, Rectangle2D dataArea,
            XYPlot plot, XYDataset dataset, PlotRenderingInfo info); @Override LegendItem getLegendItem(int datasetIndex, int series); @Override void drawItem(Graphics2D g2,
                         XYItemRendererState state,
                         Rectangle2D dataArea,
                         PlotRenderingInfo info,
                         XYPlot plot,
                         ValueAxis domainAxis,
                         ValueAxis rangeAxis,
                         XYDataset dataset,
                         int series,
                         int item,
                         CrosshairState crosshairState,
                         int pass); @Override Range findDomainBounds(XYDataset dataset); @Override Range findRangeBounds(XYDataset dataset); @Override Object clone(); @Override boolean equals(Object obj);  }