Package org.jfree.chart.renderer.xy

Examples of org.jfree.chart.renderer.xy.StackedXYBarRenderer


    }

    final XYBarRenderer renderer;
    if (stacked)
    {
      renderer = new StackedXYBarRenderer();
    }
    else
    {
      renderer = new XYBarRenderer();
    }
View Full Code Here


      axis.setAutoRangeIncludesZero(false);
      domainAxis = axis;
    }
    final ValueAxis valueAxis = new NumberAxis(yAxisLabel);

    final StackedXYBarRenderer renderer = new StackedXYBarRenderer();
    renderer.setUseYInterval(true);
    if (tooltips)
    {
      final XYToolTipGenerator tt;
      if (dateAxis)
      {
        tt = StandardXYToolTipGenerator.getTimeSeriesInstance();
      }
      else
      {
        tt = new StandardXYToolTipGenerator();
      }
      renderer.setBaseToolTipGenerator(tt);
    }
    if (urls)
    {
      renderer.setURLGenerator(new StandardXYURLGenerator());
    }

    final XYPlot plot = new XYPlot(dataset, domainAxis, valueAxis, renderer);
    plot.setOrientation(orientation);
View Full Code Here

    }

    final XYBarRenderer renderer;
    if (stacked)
    {
      renderer = new StackedXYBarRenderer();
    }
    else
    {
      renderer = new XYBarRenderer();
    }
View Full Code Here

      axis.setAutoRangeIncludesZero(false);
      domainAxis = axis;
    }
    final ValueAxis valueAxis = new NumberAxis(yAxisLabel);

    final StackedXYBarRenderer renderer = new StackedXYBarRenderer();
    renderer.setUseYInterval(true);
    if (tooltips)
    {
      final XYToolTipGenerator tt;
      if (dateAxis)
      {
        tt = StandardXYToolTipGenerator.getTimeSeriesInstance();
      }
      else
      {
        tt = new StandardXYToolTipGenerator();
      }
      renderer.setBaseToolTipGenerator(tt);
    }
    if (urls)
    {
      renderer.setURLGenerator(new StandardXYURLGenerator());
    }

    final XYPlot plot = new XYPlot(dataset, domainAxis, valueAxis, renderer);
    plot.setOrientation(orientation);
View Full Code Here

    br.setShadowXOffset(shadowXOffset);
    br.setShadowYOffset(shadowYOffset);

    if ((isStacked()) && renderPercentages && (br instanceof StackedXYBarRenderer))
    {
      final StackedXYBarRenderer sbr = (StackedXYBarRenderer) br;
      sbr.setRenderAsPercentages(true);

      final ValueAxis rangeAxis = xypl.getRangeAxis();
      final int level = getRuntime().getProcessingContext().getCompatibilityLevel();
      if (ClassicEngineBoot.isEnforceCompatibilityFor(level, 3, 8))
      {
View Full Code Here

    XYDataset dataset = createTimeDataset(values);
   
    ValueAxis timeAxis = new DateAxis(reportChart.getXAxisLabel());
    NumberAxis valueAxis = new NumberAxis(reportChart.getYAxisLabel());
   
    XYItemRenderer renderer = new StackedXYBarRenderer();
    renderer.setBaseToolTipGenerator(StandardXYToolTipGenerator.getTimeSeriesInstance());
       
    XYPlot plot = new XYPlot(dataset, timeAxis, valueAxis, renderer);
    plot.setOrientation(PlotOrientation.VERTICAL);
    if (reportChart.getPlotOrientation() == ReportChart.HORIZONTAL)
    {
View Full Code Here

    XYDataset dataset = createXYDataset(values);
   
    NumberAxis xAxis = new NumberAxis(reportChart.getXAxisLabel());
    NumberAxis yAxis = new NumberAxis(reportChart.getYAxisLabel());
   
    StackedXYBarRenderer renderer = new StackedXYBarRenderer();
    renderer.setBaseToolTipGenerator(new StandardXYToolTipGenerator());   
   
    XYPlot plot = new XYPlot(dataset, xAxis, yAxis, renderer);
    plot.setOrientation(PlotOrientation.VERTICAL);
    if (reportChart.getPlotOrientation() == ReportChart.HORIZONTAL)
    {
View Full Code Here

    /**
     * Test that the equals() method distinguishes all fields.
     */
    public void testEquals() {
        StackedXYBarRenderer r1 = new StackedXYBarRenderer();
        StackedXYBarRenderer r2 = new StackedXYBarRenderer();
        assertTrue(r1.equals(r2));
        assertTrue(r2.equals(r1));

        r1.setRenderAsPercentages(true);
        assertFalse(r1.equals(r2));
        r2.setRenderAsPercentages(true);
        assertTrue(r1.equals(r2));
    }
View Full Code Here

    /**
     * Two objects that are equal are required to return the same hashCode.
     */
    public void testHashcode() {
        StackedXYBarRenderer r1 = new StackedXYBarRenderer();
        StackedXYBarRenderer r2 = new StackedXYBarRenderer();
        assertTrue(r1.equals(r2));
        int h1 = r1.hashCode();
        int h2 = r2.hashCode();
        assertEquals(h1, h2);

        r1.setRenderAsPercentages(true);
        h1 = r1.hashCode();
        h2 = r2.hashCode();
        assertFalse(h1 == h2);
    }
View Full Code Here

    /**
     * Confirm that cloning works.
     */
    public void testCloning() {
        StackedXYBarRenderer r1 = new StackedXYBarRenderer();
        StackedXYBarRenderer r2 = null;
        try {
            r2 = (StackedXYBarRenderer) r1.clone();
        }
        catch (CloneNotSupportedException e) {
            e.printStackTrace();
        }
        assertTrue(r1 != r2);
        assertTrue(r1.getClass() == r2.getClass());
        assertTrue(r1.equals(r2));
    }
View Full Code Here

TOP

Related Classes of org.jfree.chart.renderer.xy.StackedXYBarRenderer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.