Package org.jfree.chart.renderer.xy

Examples of org.jfree.chart.renderer.xy.XYBarRenderer$XYBarRendererState


    if (urls)
    {
      urlGenerator = new StandardXYURLGenerator();
    }

    final XYBarRenderer renderer;
    if (stacked)
    {
      renderer = new StackedXYBarRenderer();
    }
    else
    {
      renderer = new XYBarRenderer();
    }
    renderer.setBaseToolTipGenerator(toolTipGenerator);
    renderer.setURLGenerator(urlGenerator);
    plot.setRenderer(renderer);

    return new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT, plot, legend);
  }
View Full Code Here


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

    final XYBarRenderer renderer = new XYBarRenderer();
    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

  {
    super.configureChart(chart);

    final XYPlot xypl = chart.getXYPlot();
    final XYItemRenderer renderer = xypl.getRenderer();
    final XYBarRenderer br = (XYBarRenderer) renderer;
    br.setDrawBarOutline(isChartSectionOutline());
    if (margin != null)
    {
      br.setMargin(margin.doubleValue());
    }
  }
View Full Code Here

//    ((NumberAxis)plot.getRangeAxis()).setTickLabelsVisible(
//        ((JRFillBarPlot)getPlot()).isShowTickLabels()
//        );


    XYBarRenderer itemRenderer = (XYBarRenderer)xyPlot.getRenderer();
    itemRenderer.setBaseItemLabelGenerator((XYItemLabelGenerator)getLabelGenerator() );
    itemRenderer.setShadowVisible(false);
   

    JRBarPlot barPlot = (JRBarPlot)getPlot();
    boolean isShowLabels = barPlot.getShowLabels() == null ? false : barPlot.getShowLabels().booleanValue();
   
    itemRenderer.setBaseItemLabelsVisible( isShowLabels );

    // Handle the axis formating for the category axis
    configureAxis(xyPlot.getDomainAxis(), barPlot.getCategoryAxisLabelFont(),
        barPlot.getCategoryAxisLabelColor(), barPlot.getCategoryAxisTickLabelFont(),
        barPlot.getCategoryAxisTickLabelColor(), barPlot.getCategoryAxisTickLabelMask(), barPlot.getCategoryAxisVerticalTickLabels(),
View Full Code Here

//    ((NumberAxis)plot.getRangeAxis()).setTickLabelsVisible(
//        ((JRBarPlot)getPlot()).isShowTickLabels()
//        );


    XYBarRenderer itemRenderer = (XYBarRenderer)xyPlot.getRenderer();
    itemRenderer.setBaseItemLabelGenerator((XYItemLabelGenerator)getLabelGenerator());
    itemRenderer.setShadowVisible(false);

    JRBarPlot barPlot = (JRBarPlot)getPlot();
    boolean isShowLabels = barPlot.getShowLabels() == null ? false : barPlot.getShowLabels().booleanValue();
   
    itemRenderer.setBaseItemLabelsVisible( isShowLabels );

    // Handle the axis formating for the category axis
    configureAxis(xyPlot.getDomainAxis(), barPlot.getCategoryAxisLabelFont(),
        barPlot.getCategoryAxisLabelColor(), barPlot.getCategoryAxisTickLabelFont(),
        barPlot.getCategoryAxisTickLabelColor(), barPlot.getCategoryAxisTickLabelMask(), barPlot.getCategoryAxisVerticalTickLabels(),
View Full Code Here

//    ((NumberAxis)plot.getRangeAxis()).setTickLabelsVisible(
//        ((JRBarPlot)getPlot()).isShowTickLabels()
//        );


    XYBarRenderer itemRenderer = (XYBarRenderer)xyPlot.getRenderer();
    itemRenderer.setBaseItemLabelGenerator((XYItemLabelGenerator)getLabelGenerator());
    itemRenderer.setShadowVisible(false);

    JRBarPlot barPlot = (JRBarPlot)getPlot();
    boolean isShowLabels = barPlot.getShowLabels() == null ? false : barPlot.getShowLabels().booleanValue();
   
    itemRenderer.setBaseItemLabelsVisible( isShowLabels );

    // Handle the axis formating for the category axis
    configureAxis(xyPlot.getDomainAxis(), barPlot.getCategoryAxisLabelFont(),
        barPlot.getCategoryAxisLabelColor(), barPlot.getCategoryAxisTickLabelFont(),
        barPlot.getCategoryAxisTickLabelColor(), barPlot.getCategoryAxisTickLabelMask(), barPlot.getCategoryAxisVerticalTickLabels(),
View Full Code Here

   */
  protected JFreeChart createXYBarChart() throws JRException
  {
    JFreeChart jfreeChart = super.createXYBarChart();
    XYPlot xyPlot = (XYPlot)jfreeChart.getPlot();
    XYBarRenderer renderer = (XYBarRenderer)xyPlot.getRenderer();
    renderer.setMargin(0.1);
    renderer.setGradientPaintTransformer(
        new StandardGradientPaintTransformer(GradientPaintTransformType.HORIZONTAL)
        );
    XYDataset xyDataset = xyPlot.getDataset();
    if(xyDataset != null)
    {
      for(int i = 0; i < xyDataset.getSeriesCount(); i++)
      {
        renderer.setSeriesPaint(i, (Paint)ChartThemesConstants.EYE_CANDY_SIXTIES_GRADIENT_PAINTS.get(i));
      }
    }
    return jfreeChart;
  }
View Full Code Here

  {
    super.configureChart(chart);

    final XYPlot xypl = chart.getXYPlot();
    final XYItemRenderer renderer = xypl.getRenderer();
    final XYBarRenderer br = (XYBarRenderer) renderer;
    br.setDrawBarOutline(isChartSectionOutline());
    if (margin != null)
    {
      br.setMargin(margin.doubleValue());
    }

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

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

    if (urls)
    {
      urlGenerator = new StandardXYURLGenerator();
    }

    final XYBarRenderer renderer;
    if (stacked)
    {
      renderer = new StackedXYBarRenderer();
    }
    else
    {
      renderer = new XYBarRenderer();
    }
    renderer.setBaseToolTipGenerator(toolTipGenerator);
    renderer.setURLGenerator(urlGenerator);
    plot.setRenderer(renderer);

    return new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT, plot, legend);
  }
View Full Code Here

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

    final XYBarRenderer renderer = new XYBarRenderer();
    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

TOP

Related Classes of org.jfree.chart.renderer.xy.XYBarRenderer$XYBarRendererState

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.