Examples of PiePlot3D


Examples of org.jfree.chart.plot.PiePlot3D

        true,
        false
    );

    // set the background color for the chart...
    final PiePlot3D plot = (PiePlot3D) chart.getPlot();
    plot.setStartAngle(270);
//    plot.setDirection(Rotation.CLOCKWISE);
    plot.setForegroundAlpha(0.5f);
    plot.setNoDataMessage("No data to display");

    return chart;

  }
View Full Code Here

Examples of org.jfree.chart.plot.PiePlot3D

        true,
        false
    );

    // set the background color for the chart...
    final PiePlot3D plot = (PiePlot3D) chart.getPlot();
    plot.setStartAngle(270);
//    plot.setDirection(Rotation.CLOCKWISE);
    plot.setForegroundAlpha(0.5f);
    plot.setNoDataMessage("No data to display");

    return chart;

  }
View Full Code Here

Examples of org.jfree.chart.plot.PiePlot3D

        true,
        false
    );

    // set the background color for the chart...
    final PiePlot3D plot = (PiePlot3D) chart.getPlot();
    plot.setStartAngle(270);
//    plot.setDirection(Rotation.CLOCKWISE);
    plot.setForegroundAlpha(0.5f);
    plot.setNoDataMessage("No data to display");

    return chart;

  }
View Full Code Here

Examples of org.jfree.chart.plot.PiePlot3D

        false
    );

    // set the background color for the chart...
    chart.setBackgroundPaint(Color.yellow);
    final PiePlot3D plot = (PiePlot3D) chart.getPlot();
    plot.setStartAngle(270);
//    plot.setDirection(Rotation.CLOCKWISE);
    plot.setForegroundAlpha(0.5f);
    plot.setNoDataMessage("No data to display");

    return chart;

  }
View Full Code Here

Examples of org.jfree.chart.plot.PiePlot3D

        false
    );

    // set the background color for the chart...
    chart.setBackgroundPaint(Color.yellow);
    final PiePlot3D plot = (PiePlot3D) chart.getPlot();
    plot.setStartAngle(270);
//    plot.setDirection(Rotation.CLOCKWISE);
    plot.setForegroundAlpha(0.5f);
    plot.setNoDataMessage("No data to display");

    return chart;

  }
View Full Code Here

Examples of org.jfree.chart.plot.PiePlot3D

        true,
        false
    );

    // set the background color for the chart...
    final PiePlot3D plot = (PiePlot3D) chart.getPlot();
    plot.setStartAngle(270);
//    plot.setDirection(Rotation.CLOCKWISE);
    plot.setForegroundAlpha(0.5f);
    plot.setNoDataMessage("No data to display");

    return chart;

  }
View Full Code Here

Examples of org.jfree.chart.plot.PiePlot3D

        false
        );

    configureChart(jfreeChart);

    PiePlot3D piePlot3D = (PiePlot3D) jfreeChart.getPlot();
    //plot.setStartAngle(290);
    //plot.setDirection(Rotation.CLOCKWISE);
    //plot.setNoDataMessage("No data to display");
    JRPie3DPlot jrPie3DPlot = (JRPie3DPlot)getPlot();
    double depthFactor = jrPie3DPlot.getDepthFactorDouble() == null ? JRPie3DPlot.DEPTH_FACTOR_DEFAULT : jrPie3DPlot.getDepthFactorDouble().doubleValue();
    boolean isCircular =  jrPie3DPlot.getCircular() == null ? false : jrPie3DPlot.getCircular().booleanValue();
    piePlot3D.setDepthFactor(depthFactor);
    piePlot3D.setCircular(isCircular);
   
    boolean isShowLabels = jrPie3DPlot.getShowLabels() == null ? true : jrPie3DPlot.getShowLabels().booleanValue();

    if(isShowLabels)
    {
      PieSectionLabelGenerator labelGenerator = (PieSectionLabelGenerator)getLabelGenerator();
      JRItemLabel itemLabel = jrPie3DPlot.getItemLabel();
      if (labelGenerator != null)
      {
        piePlot3D.setLabelGenerator(labelGenerator);
      }
      else if (jrPie3DPlot.getLabelFormat() != null)
      {
        piePlot3D.setLabelGenerator(
          new StandardPieSectionLabelGenerator(jrPie3DPlot.getLabelFormat())
          );
      }
  //    else if (itemLabel != null && itemLabel.getMask() != null)
  //    {
  //      piePlot3D.setLabelGenerator(
  //          new StandardPieSectionLabelGenerator(itemLabel.getMask())
  //          );
  //    }
     
      if(itemLabel != null && itemLabel.getFont() != null)
      {
        piePlot3D.setLabelFont(JRFontUtil.getAwtFont(itemLabel.getFont(), getLocale()));
      }
      else
      {
        piePlot3D.setLabelFont(JRFontUtil.getAwtFont(new JRBaseFont(getChart(), null), getLocale()));
      }
 
      if(itemLabel != null && itemLabel.getColor() != null)
      {
        piePlot3D.setLabelPaint(itemLabel.getColor());
      }
      else
      {
        piePlot3D.setLabelPaint(getChart().getForecolor());
      }
 
      if(itemLabel != null && itemLabel.getBackgroundColor() != null)
      {
        piePlot3D.setLabelBackgroundPaint(itemLabel.getBackgroundColor());
      }
      else
      {
        piePlot3D.setLabelBackgroundPaint(getChart().getBackcolor());
      }
    }
    else
    {
      piePlot3D.setLabelGenerator(null);
    }
   
    if (jrPie3DPlot.getLegendLabelFormat() != null)
    {
      piePlot3D.setLegendLabelGenerator(
        new StandardPieSectionLabelGenerator(jrPie3DPlot.getLegendLabelFormat())
        );
    }
   
    return jfreeChart;
View Full Code Here

Examples of org.jfree.chart.plot.PiePlot3D

   */
  protected JFreeChart createPie3DChart() throws JRException
  {
    JFreeChart jfreeChart = super.createPie3DChart();

    PiePlot3D piePlot3D = (PiePlot3D) jfreeChart.getPlot();
    if(piePlot3D.getLabelGenerator() != null)
    {
      piePlot3D.setLabelBackgroundPaint(ChartThemesConstants.TRANSPARENT_PAINT);
      piePlot3D.setLabelShadowPaint(ChartThemesConstants.TRANSPARENT_PAINT);
      piePlot3D.setLabelOutlinePaint(ChartThemesConstants.TRANSPARENT_PAINT);
    }
    piePlot3D.setDarkerSides(true);
    piePlot3D.setDepthFactor(0.07);
//does not work for 3D
//    piePlot3D.setShadowXOffset(5);
//    piePlot3D.setShadowYOffset(10);
//    piePlot3D.setShadowPaint(new GradientPaint(
//        0,
//        getChart().getHeight() / 2,
//        new Color(41, 120, 162),
//        0,
//        getChart().getHeight(),
//        Color.white)
//    );

    PieDataset pieDataset = piePlot3D.getDataset();
    if(pieDataset != null)
    {
      for(int i = 0; i < pieDataset.getItemCount(); i++)
      {
        piePlot3D.setSectionOutlinePaint(pieDataset.getKey(i), ChartThemesConstants.TRANSPARENT_PAINT);
      }
    }
    piePlot3D.setCircular(true);
    return jfreeChart;
  }
View Full Code Here

Examples of org.jfree.chart.plot.PiePlot3D

        false
        );

    configureChart(jfreeChart, getPlot());

    PiePlot3D piePlot3D = (PiePlot3D) jfreeChart.getPlot();
    //plot.setStartAngle(290);
    //plot.setDirection(Rotation.CLOCKWISE);
    //plot.setNoDataMessage("No data to display");
    JRPie3DPlot jrPie3DPlot = (JRPie3DPlot)getPlot();
    double depthFactor = jrPie3DPlot.getDepthFactorDouble() == null ? JRPie3DPlot.DEPTH_FACTOR_DEFAULT : jrPie3DPlot.getDepthFactorDouble().doubleValue();
    boolean isCircular =  jrPie3DPlot.getCircular() == null ? false : jrPie3DPlot.getCircular().booleanValue();
    piePlot3D.setDepthFactor(depthFactor);
    piePlot3D.setCircular(isCircular);

    boolean isShowLabels = jrPie3DPlot.getShowLabels() == null ? true : jrPie3DPlot.getShowLabels().booleanValue();
   
    if(isShowLabels)
    {
      PieSectionLabelGenerator labelGenerator = (PieSectionLabelGenerator)getLabelGenerator();
      JRItemLabel itemLabel = jrPie3DPlot.getItemLabel();
      if (labelGenerator != null)
      {
        piePlot3D.setLabelGenerator(labelGenerator);
      }
      else if (jrPie3DPlot.getLabelFormat() != null)
      {
        piePlot3D.setLabelGenerator(
          new StandardPieSectionLabelGenerator(jrPie3DPlot.getLabelFormat())
          );
      }
  //    else if (itemLabel != null && itemLabel.getMask() != null)
  //    {
  //      piePlot3D.setLabelGenerator(
  //          new StandardPieSectionLabelGenerator(itemLabel.getMask())
  //          );
  //    }
     
      if(itemLabel != null && itemLabel.getFont() != null)
      {
        piePlot3D.setLabelFont(JRFontUtil.getAwtFont(itemLabel.getFont(), getLocale()));
      }
      else
      {
        piePlot3D.setLabelFont(JRFontUtil.getAwtFont(new JRBaseFont(getChart(), null), getLocale()));
      }
 
      if(itemLabel != null && itemLabel.getColor() != null)
      {
        piePlot3D.setLabelPaint(itemLabel.getColor());
      }
      else
      {
        piePlot3D.setLabelPaint(getChart().getForecolor());
      }
 
      if(itemLabel != null && itemLabel.getBackgroundColor() != null)
      {
        piePlot3D.setLabelBackgroundPaint(itemLabel.getBackgroundColor());
      }
      else
      {
        piePlot3D.setLabelBackgroundPaint(getChart().getBackcolor());
      }
    }
    else
    {
      piePlot3D.setLabelGenerator(null);
    }

    if (jrPie3DPlot.getLegendLabelFormat() != null)
    {
      piePlot3D.setLegendLabelGenerator(
        new StandardPieSectionLabelGenerator(jrPie3DPlot.getLegendLabelFormat())
        );
    }
   
    return jfreeChart;
View Full Code Here

Examples of org.jfree.chart.plot.PiePlot3D

        false
        );

    configureChart(jfreeChart, getPlot());

    PiePlot3D piePlot3D = (PiePlot3D) jfreeChart.getPlot();
    //plot.setStartAngle(290);
    //plot.setDirection(Rotation.CLOCKWISE);
    //plot.setNoDataMessage("No data to display");
    JRPie3DPlot jrPie3DPlot = (JRPie3DPlot)getPlot();
    double depthFactor = jrPie3DPlot.getDepthFactorDouble() == null ? JRPie3DPlot.DEPTH_FACTOR_DEFAULT : jrPie3DPlot.getDepthFactorDouble().doubleValue();
    boolean isCircular =  jrPie3DPlot.getCircular() == null ? false : jrPie3DPlot.getCircular().booleanValue();
    piePlot3D.setDepthFactor(depthFactor);
    piePlot3D.setCircular(isCircular);

    boolean isShowLabels = jrPie3DPlot.getShowLabels() == null ? true : jrPie3DPlot.getShowLabels().booleanValue();
   
    if(isShowLabels)
    {
      PieSectionLabelGenerator labelGenerator = (PieSectionLabelGenerator)getLabelGenerator();
      JRItemLabel itemLabel = jrPie3DPlot.getItemLabel();
      if (labelGenerator != null)
      {
        piePlot3D.setLabelGenerator(labelGenerator);
      }
      else if (jrPie3DPlot.getLabelFormat() != null)
      {
        piePlot3D.setLabelGenerator(
          new StandardPieSectionLabelGenerator(jrPie3DPlot.getLabelFormat())
          );
      }
  //    else if (itemLabel != null && itemLabel.getMask() != null)
  //    {
  //      piePlot3D.setLabelGenerator(
  //        new StandardPieSectionLabelGenerator(itemLabel.getMask())
  //        );
  //    }
      else
      {
        piePlot3D.setLabelGenerator(
            new StandardPieSectionLabelGenerator()
            );
      }
 
      Integer baseFontSize = (Integer)getDefaultValue(defaultChartPropertiesMap, ChartThemesConstants.BASEFONT_SIZE);
      JRFont font = itemLabel != null && itemLabel.getFont() != null ? itemLabel.getFont() : null;
      piePlot3D.setLabelFont(getFont(new JRBaseFont(getChart(), null), font, baseFontSize));
 
      if(itemLabel != null && itemLabel.getColor() != null)
      {
        piePlot3D.setLabelPaint(itemLabel.getColor());
      }
      else
      {
        piePlot3D.setLabelPaint(getChart().getForecolor());
      }
 
      if(itemLabel != null && itemLabel.getBackgroundColor() != null)
      {
        piePlot3D.setLabelBackgroundPaint(itemLabel.getBackgroundColor());
      }
      else
      {
        piePlot3D.setLabelBackgroundPaint(getChart().getBackcolor());
      }
    }
    else
    {
      piePlot3D.setLabelGenerator(null);
    }
   
    if (jrPie3DPlot.getLegendLabelFormat() != null)
    {
      piePlot3D.setLegendLabelGenerator(
        new StandardPieSectionLabelGenerator(jrPie3DPlot.getLegendLabelFormat())
        );
    }
   
    return jfreeChart;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.