Examples of PiePlot3D


Examples of org.jfree.chart.plot.PiePlot3D

                                              PieDataset dataset,
                                              boolean legend,
                                              boolean tooltips,
                                              boolean urls) {

        PiePlot3D plot = new PiePlot3D(dataset);
        plot.setInsets(new RectangleInsets(0.0, 5.0, 5.0, 5.0));
        if (tooltips) {
            plot.setToolTipGenerator(new StandardPieToolTipGenerator());
        }
        if (urls) {
            plot.setURLGenerator(new StandardPieURLGenerator());
        }
        JFreeChart chart = new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT,
                plot, legend);
        currentTheme.apply(chart);
        return chart;
View Full Code Here

Examples of org.jfree.chart.plot.PiePlot3D

        MultiplePiePlot plot = new MultiplePiePlot(dataset);
        plot.setDataExtractOrder(order);
        plot.setBackgroundPaint(null);
        plot.setOutlineStroke(null);

        JFreeChart pieChart = new JFreeChart(new PiePlot3D(null));
        TextTitle seriesTitle = new TextTitle("Series Title",
                new Font("SansSerif", Font.BOLD, 12));
        seriesTitle.setPosition(RectangleEdge.BOTTOM);
        pieChart.setTitle(seriesTitle);
        pieChart.removeLegend();
View Full Code Here

Examples of org.jfree.chart.plot.PiePlot3D

  }

  private void buildChart() {
    PieDataset dataset = getDataSet();
    JFreeChart chart = ChartFactory.createPieChart3D(" 项目进度分布", dataset, true, true, false);
    PiePlot3D plot = (PiePlot3D) chart.getPlot();
    // 图片中显示百分比:默认方式
    // plot.setLabelGenerator(new
    // StandardPieSectionLabelGenerator(StandardPieToolTipGenerator.DEFAULT_TOOLTIP_FORMAT));
    // 图片中显示百分比:自定义方式,{0} 表示选项, {1} 表示数值, {2} 表示所占比例 ,小数点后两位
    plot.setLabelGenerator(new StandardPieSectionLabelGenerator(
        "{0}={1}({2})", NumberFormat.getNumberInstance(),
        new DecimalFormat("0.00%")));
    // 图例显示百分比:自定义方式, {0} 表示选项, {1} 表示数值, {2} 表示所占比例
    plot.setLegendLabelGenerator(new StandardPieSectionLabelGenerator(
        "{0}={1}({2})"));
    // 设置背景色为白色
    chart.setBackgroundPaint(Color.white);
    // 指定图片的透明度(0.0-1.0)
    plot.setForegroundAlpha(1.0f);
    // 指定显示的饼图上圆形(false)还椭圆形(true)
    plot.setCircular(true);
    // 设置图标题的字体
    Font font = new Font(" 黑体", Font.CENTER_BASELINE, 20);
    TextTitle title = new TextTitle(" 项目状态分布");
    title.setFont(font);
    chart.setTitle(title);
View Full Code Here

Examples of org.jfree.chart.plot.PiePlot3D

     * @since 1.0.7
     */
    public static JFreeChart createPieChart3D(String title, PieDataset dataset,
            boolean legend, boolean tooltips, Locale locale) {

        PiePlot3D plot = new PiePlot3D(dataset);
        plot.setInsets(new RectangleInsets(0.0, 5.0, 5.0, 5.0));
        if (tooltips) {
            plot.setToolTipGenerator(new StandardPieToolTipGenerator(locale));
        }
        JFreeChart chart = new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT,
                plot, legend);
        currentTheme.apply(chart);
        return chart;
View Full Code Here

Examples of org.jfree.chart.plot.PiePlot3D

                                              PieDataset dataset,
                                              boolean legend,
                                              boolean tooltips,
                                              boolean urls) {

        PiePlot3D plot = new PiePlot3D(dataset);
        plot.setInsets(new RectangleInsets(0.0, 5.0, 5.0, 5.0));
        if (tooltips) {
            plot.setToolTipGenerator(new StandardPieToolTipGenerator());
        }
        if (urls) {
            plot.setURLGenerator(new StandardPieURLGenerator());
        }
        JFreeChart chart = new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT,
                plot, legend);
        currentTheme.apply(chart);
        return chart;
View Full Code Here

Examples of org.jfree.chart.plot.PiePlot3D

        MultiplePiePlot plot = new MultiplePiePlot(dataset);
        plot.setDataExtractOrder(order);
        plot.setBackgroundPaint(null);
        plot.setOutlineStroke(null);

        JFreeChart pieChart = new JFreeChart(new PiePlot3D(null));
        TextTitle seriesTitle = new TextTitle("Series Title",
                new Font("SansSerif", Font.BOLD, 12));
        seriesTitle.setPosition(RectangleEdge.BOTTOM);
        pieChart.setTitle(seriesTitle);
        pieChart.removeLegend();
View Full Code Here

Examples of org.jfree.chart.plot.PiePlot3D

    for (CountryStats current : getCountryStats()) {
      values.addValue(current.country, current.population);
    }
    PieDataset pieDataset = new DefaultPieDataset(values);

    PiePlot3D plot = new PiePlot3D(pieDataset);
    plot.setForegroundAlpha(0.7f);
    plot.setDepthFactor(0.1);
    plot.setCircular(true);

    final JFreeChart chart = new JFreeChart(plot);
    chart.removeLegend();
    chart.setTitle("Top 10 Country Populations");
View Full Code Here

Examples of org.jfree.chart.plot.PiePlot3D

                                              PieDataset dataset,
                                              boolean legend,
                                              boolean tooltips,
                                              boolean urls) {

        PiePlot3D plot = new PiePlot3D(dataset);
        plot.setInsets(new Insets(0, 5, 5, 5));
        if (tooltips) {
            plot.setToolTipGenerator(new StandardPieItemLabelGenerator());
        }
        if (urls) {
            plot.setURLGenerator(new StandardPieURLGenerator());
        }
        return new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT, plot, legend);

    }
View Full Code Here

Examples of org.jfree.chart.plot.PiePlot3D

        MultiplePiePlot plot = new MultiplePiePlot(dataset);
        plot.setDataExtractOrder(order);
        plot.setBackgroundPaint(null);
        plot.setOutlineStroke(null);

        JFreeChart pieChart = new JFreeChart(new PiePlot3D(null));
        TextTitle seriesTitle = new TextTitle("Series Title", new Font("SansSerif", Font.BOLD, 12));
        seriesTitle.setPosition(RectangleEdge.BOTTOM);
        pieChart.setTitle(seriesTitle);
        pieChart.setBackgroundPaint(null);
        plot.setPieChart(pieChart);
View Full Code Here

Examples of org.jfree.chart.plot.PiePlot3D

    /**
     * Serialize an instance, restore it, and check for equality.
     */
    public void testSerialization() {

        PiePlot3D p1 = new PiePlot3D(null);
        PiePlot3D p2 = null;

        try {
            ByteArrayOutputStream buffer = new ByteArrayOutputStream();
            ObjectOutput out = new ObjectOutputStream(buffer);
            out.writeObject(p1);
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.