Examples of StandardPieSectionLabelGenerator


Examples of com.positive.charts.labels.StandardPieSectionLabelGenerator

   */
  public static Chart createPieChart(final String title,
      final PieDataset dataset, final boolean legend, final Locale locale) {

    final PiePlot plot = new PiePlot(dataset);
    plot.setLabelGenerator(new StandardPieSectionLabelGenerator(locale));
    plot.setInsets(new RectangleInsets(0.0, 5.0, 5.0, 5.0));
    final Chart chart = new Chart(plot, legend);
    chart.setTitle(title);
    return chart;

View Full Code Here

Examples of com.positive.charts.labels.StandardPieSectionLabelGenerator

    // this.sectionOutlineStrokeMap = new StrokeMap();
    // this.baseSectionOutlineStroke = DEFAULT_OUTLINE_STROKE;

    this.explodePercentages = new TreeMap();

    this.labelGenerator = new StandardPieSectionLabelGenerator();
    this.labelFont = DEFAULT_LABEL_FONT;
    this.labelPaint = DEFAULT_LABEL_PAINT;
    this.labelBackgroundPaint = DEFAULT_LABEL_BACKGROUND_PAINT;
    this.labelOutlinePaint = DEFAULT_LABEL_OUTLINE_PAINT;
    this.labelOutlineStroke = DEFAULT_LABEL_OUTLINE_STROKE;
    this.labelShadowPaint = DEFAULT_LABEL_SHADOW_PAINT;
    this.labelLinksVisible = true;
    this.labelDistributor = new PieLabelDistributor(0);

    this.simpleLabels = false;
    this.simpleLabelOffset = new RectangleInsets(UnitType.ABSOLUTE, 1, 1,
        1, 1);
    this.labelPadding = new RectangleInsets(2, 2, 2, 2);

    this.toolTipGenerator = null;
    this.urlGenerator = null;
    this.legendLabelGenerator = new StandardPieSectionLabelGenerator();
    this.legendLabelToolTipGenerator = null;
    this.legendLabelURLGenerator = null;
    // this.legendItemShape = Plot.DEFAULT_LEGEND_ITEM_CIRCLE;

    this.ignoreNullValues = false;
View Full Code Here

Examples of org.jfree.chart.labels.StandardPieSectionLabelGenerator

      piePlot.setSectionOutlinesVisible(visibility.isPieOutlines());
      piePlot.setLabelLinksVisible(visibility.isPieLabelLinks());
     
      //piePlot.setExplodePercent("1", 0.07000000000000001D);
      //piePlot.setInteriorGap(0.00D);
      piePlot.setLabelGenerator(new StandardPieSectionLabelGenerator(chartConfig.getDataSettings().getPieSectionLabel()));
      //piePlot.setLabelBackgroundPaint(new Color(220, 220, 220));
      for(int index = 0; index < colors.getSeries().size(); index++){
        piePlot.setSectionPaint(String.valueOf(index), new Color(colors.getSeries().get(index)));
      }
    }
View Full Code Here

Examples of org.jfree.chart.labels.StandardPieSectionLabelGenerator

    {
      pp.setLabelGenerator(null);
    }
    else
    {
      final StandardPieSectionLabelGenerator labelGen = new StandardPieSectionLabelGenerator(pieLabelFormat);
      pp.setLabelGenerator(labelGen);

      final StandardPieSectionLabelGenerator legendGen = new StandardPieSectionLabelGenerator(pieLegendLabelFormat);
      pp.setLegendLabelGenerator(legendGen);
    }

    if (StringUtils.isEmpty(getLabelFont()) == false)
    {
View Full Code Here

Examples of org.jfree.chart.labels.StandardPieSectionLabelGenerator

    {
      pp.setLabelGenerator(null);
    }
    else
    {
      final StandardPieSectionLabelGenerator labelGen = new StandardPieSectionLabelGenerator(multipieLabelFormat);
      pp.setLabelGenerator(labelGen);
    }
  }
View Full Code Here

Examples of org.jfree.chart.labels.StandardPieSectionLabelGenerator

        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.labels.StandardPieSectionLabelGenerator

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

Examples of org.jfree.chart.labels.StandardPieSectionLabelGenerator

        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

Examples of org.jfree.chart.labels.StandardPieSectionLabelGenerator

        piePlot.setLabelGenerator(labelGenerator);
      }
      else if (jrPiePlot.getLabelFormat() != null)
      {
        piePlot.setLabelGenerator(
          new StandardPieSectionLabelGenerator(jrPiePlot.getLabelFormat())
          );
      }
  //    else if (itemLabel != null && itemLabel.getMask() != null)
  //    {
  //      piePlot.setLabelGenerator(
  //          new StandardPieSectionLabelGenerator(itemLabel.getMask())
  //          );
  //
  //    }
 
      Integer baseFontSize = (Integer)getDefaultValue(defaultChartPropertiesMap, ChartThemesConstants.BASEFONT_SIZE);
      JRFont font = itemLabel != null && itemLabel.getFont() != null ? itemLabel.getFont() : null;
     
      piePlot.setLabelFont(getFont(new JRBaseFont(getChart(), null), font, baseFontSize));
 
      if(itemLabel != null && itemLabel.getColor() != null)
      {
        piePlot.setLabelPaint(itemLabel.getColor());
      }
      else
      {
        piePlot.setLabelPaint(getChart().getForecolor());
      }
 
      if(itemLabel != null && itemLabel.getBackgroundColor() != null)
      {
        piePlot.setLabelBackgroundPaint(itemLabel.getBackgroundColor());
      }
      else
      {
        piePlot.setLabelBackgroundPaint(getChart().getBackcolor());
      }
    }
    else
    {
      piePlot.setLabelGenerator(null);
    }
   
   
    if (jrPiePlot.getLegendLabelFormat() != null)
    {
      piePlot.setLegendLabelGenerator(
        new StandardPieSectionLabelGenerator(jrPiePlot.getLegendLabelFormat())
        );
    }
   
    return jfreeChart;
  }
View Full Code Here

Examples of org.jfree.chart.labels.StandardPieSectionLabelGenerator

        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
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.