Examples of PiePlot


Examples of ar.com.fdvs.dj.domain.chart.plot.PiePlot

        dataset = new CategoryDataset();
        plot = new LinePlot();
        break;
      case PIE_CHART:
        dataset = new PieDataset();
        plot = new PiePlot();
        break;
      case PIE3D_CHART:
        dataset = new PieDataset();
        plot = new Pie3DPlot();
        break;
View Full Code Here

Examples of com.positive.charts.plot.PiePlot

   * @since 1.0.7
   */
  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.plot.PiePlot

        ImageHyperlink createImageHyperlink = formToolkit
            .createImageHyperlink(bs, SWT.NONE);
        createImageHyperlink.setText(getChartName(hotSpotsByModule[a]));
        final Image image = new Image(Display.getCurrent(), 16, 16);
        GC gc = new GC(image);
        PiePlot plot = (PiePlot) ch.getPlot();
        String key = getChartName(hotSpotsByModule[a]) + " "
            + StringUtils.getPercentNumberString(value);
        gc.setBackground(plot.lookupSectionPaint(key, true));
        gc.fillRoundRectangle(0, 0, 16, 16, 2, 2);
        gc.dispose();
        final int b = a;
        createImageHyperlink.setImage(image);
        createImageHyperlink.addDisposeListener(new DisposeListener() {
View Full Code Here

Examples of com.positive.charts.plot.PiePlot

    Chart chart = ChartFactory.createPieChart(title,
    // title
        dataset, // data
        true, Locale.getDefault()// include legend
        );
    PiePlot plot = (PiePlot) chart.getPlot();
    plot.setSectionOutlinesVisible(false);
    plot.setNoDataMessage("No data available");
    plot.setSimpleLabels(false);
    plot.setCircular(true);
    chart.setPadding(new RectangleInsets(0, 0, 0, 0));
    chart.removeLegend();
    return chart;
  }
View Full Code Here

Examples of org.jfree.chart.plot.PiePlot

    TextTitle t1 = new TextTitle("Total Open Tickets: " + String.valueOf(totalTickets),
                                 new Font("SansSerif", Font.PLAIN, 11));
    pieChart.addSubtitle(t1);

    // set the chart visual options
    PiePlot plot = (PiePlot)pieChart.getPlot();
    plot.setForegroundAlpha(0.65f);
    plot.setNoDataMessage("There are no currently open tickets.");

    // print the chart image directly the the HTTP stream
    OutputStream out = response.getOutputStream();
    response.setContentType("image/jpeg");
View Full Code Here

Examples of org.jfree.chart.plot.PiePlot

                                 "Total Amount: " + totalActualString,
                                 new Font("SansSerif", Font.PLAIN, 11));
    pieChart.addSubtitle(t1);

    // set the chart visual options
    PiePlot plot = (PiePlot)pieChart.getPlot();
    plot.setForegroundAlpha(0.65f);
    plot.setNoDataMessage("No data to display");
    plot.setLabelGenerator(new CustomLabelGenerator(numFormatter));

    // print the chart image directly the the HTTP stream
    OutputStream out = response.getOutputStream();
    response.setContentType("image/jpeg");
     
View Full Code Here

Examples of org.jfree.chart.plot.PiePlot

      CategoryItemRenderer rendrer = categoryPlot.getRenderer();
      for(int index = 0; index < colors.getSeries().size(); index++){
        rendrer.setSeriesPaint(index, new Color(colors.getSeries().get(index)));
      }
    }else if(plot instanceof PiePlot){
      PiePlot piePlot = (PiePlot)plot;
     
      piePlot.setSimpleLabels(visibility.isPieSimpleLabels());
      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.plot.PiePlot

  protected void configureChart(final JFreeChart chart)
  {
    super.configureChart(chart);

    final Plot plot = chart.getPlot();
    final PiePlot pp = (PiePlot) plot;
    final PieDataset pieDS = pp.getDataset();
    pp.setDirection(rotationClockwise ? Rotation.CLOCKWISE : Rotation.ANTICLOCKWISE);
    if ((explodeSegment != null) && (explodePct != null))
    {
      configureExplode(pp);
    }
    if (StringUtils.isEmpty(getTooltipFormula()) == false)
    {
      pp.setToolTipGenerator(new FormulaPieTooltipGenerator(getRuntime(), getTooltipFormula()));
    }
    if (StringUtils.isEmpty(getUrlFormula()) == false)
    {
      pp.setURLGenerator(new FormulaPieURLGenerator(getRuntime(), getUrlFormula()));
    }

    pp.setIgnoreNullValues(ignoreNulls);
    pp.setIgnoreZeroValues(ignoreZeros);
    if (Boolean.FALSE.equals(getItemsLabelVisible()))
    {
      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)
    {
      pp.setLabelFont(Font.decode(getLabelFont()));
    }

    if (pieDS != null)
    {
      final String[] colors = getSeriesColor();
      for (int i = 0; i < colors.length; i++)
      {
        if (i < pieDS.getItemCount())
        {
          pp.setSectionPaint(pieDS.getKey(i), parseColorFromString(colors[i]));
        }
        else
        {
          break;
        }
      }
    }

    if (shadowPaint != null)
    {
      pp.setShadowPaint(shadowPaint);
    }
    if (shadowXOffset != null)
    {
      pp.setShadowXOffset(shadowXOffset.doubleValue());
    }
    if (shadowYOffset != null)
    {
      pp.setShadowYOffset(shadowYOffset.doubleValue());
    }
    pp.setCircular(circular);
  }
View Full Code Here

Examples of org.jfree.chart.plot.PiePlot

    final Plot plot = chart.getPlot();
    final MultiplePiePlot mpp = (MultiplePiePlot) plot;
    final JFreeChart pc = mpp.getPieChart();
    configureSubChart(pc);

    final PiePlot pp = (PiePlot) pc.getPlot();
    if (StringUtils.isEmpty(getTooltipFormula()) == false)
    {
      pp.setToolTipGenerator(new FormulaPieTooltipGenerator(getRuntime(), getTooltipFormula()));
    }
    if (StringUtils.isEmpty(getUrlFormula()) == false)
    {
      pp.setURLGenerator(new FormulaPieURLGenerator(getRuntime(), getUrlFormula()));
    }

    if (shadowPaint != null)
    {
      pp.setShadowPaint(shadowPaint);
    }
    if (shadowXOffset != null)
    {
      pp.setShadowXOffset(shadowXOffset.doubleValue());
    }
    if (shadowYOffset != null)
    {
      pp.setShadowYOffset(shadowYOffset.doubleValue());
    }

    final CategoryDataset c = mpp.getDataset();
    if (c != null)
    {
      final String[] colors = getSeriesColor();
      final int keysSize = c.getColumnKeys().size();
      for (int i = 0; i < colors.length; i++)
      {
        if (keysSize > i)
        {
          pp.setSectionPaint(c.getColumnKey(i), parseColorFromString(colors[i]));
        }
      }
    }

    if (StringUtils.isEmpty(getLabelFont()) == false)
    {
      pp.setLabelFont(Font.decode(getLabelFont()));
    }

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

Examples of org.jfree.chart.plot.PiePlot

    this(chart,0,0,300,300);
  }

  public PieChartShape(JFreeChart chart, int ox, int oy, int width, int height) {
    super(chart, ox, oy, width, height);
    PiePlot plot = (PiePlot)chart.getPlot();
    mapperSources = new Vector();
    mappers = new Vector();
  }
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.