当前位置: 首页>>代码示例>>Java>>正文


Java PiePlot.setSectionOutlinesVisible方法代码示例

本文整理汇总了Java中org.jfree.chart.plot.PiePlot.setSectionOutlinesVisible方法的典型用法代码示例。如果您正苦于以下问题:Java PiePlot.setSectionOutlinesVisible方法的具体用法?Java PiePlot.setSectionOutlinesVisible怎么用?Java PiePlot.setSectionOutlinesVisible使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.jfree.chart.plot.PiePlot的用法示例。


在下文中一共展示了PiePlot.setSectionOutlinesVisible方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createChart

import org.jfree.chart.plot.PiePlot; //导入方法依赖的package包/类
/**
 * Creates a chart.
 * 
 * @param dataset  the dataset.
 * 
 * @return A chart.
 */
private static JFreeChart createChart(PieDataset dataset) {
    
    JFreeChart chart = ChartFactory.createPieChart(
        "Pie Chart Demo 1",  // chart title
        dataset,             // data
        true,               // include legend
        true,
        false
    );

    PiePlot plot = (PiePlot) chart.getPlot();
    plot.setSectionOutlinesVisible(false);
    plot.setLabelFont(new Font("SansSerif", Font.PLAIN, 12));
    plot.setNoDataMessage("No data available");
    plot.setCircular(false);
    plot.setLabelGap(0.02);
    return chart;
    
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:27,代码来源:SWTPieChartDemo1.java

示例2: createChart

import org.jfree.chart.plot.PiePlot; //导入方法依赖的package包/类
/**
 * Creates a chart.
 *
 * @param dataset  the dataset.
 *
 * @return A chart.
 */
private static JFreeChart createChart(PieDataset dataset) {

    JFreeChart chart = ChartFactory.createPieChart(
        "Pie Chart Demo 1",  // chart title
        dataset,             // data
        true,               // include legend
        true,
        false
    );

    PiePlot plot = (PiePlot) chart.getPlot();
    plot.setSectionOutlinesVisible(false);
    plot.setNoDataMessage("No data available");

    return chart;

}
 
开发者ID:SOCR,项目名称:HTML5_WebSite,代码行数:25,代码来源:PieChartDemo1.java

示例3: createChart

import org.jfree.chart.plot.PiePlot; //导入方法依赖的package包/类
/**
 * Creates a chart.
 *
 * @param dataset  the dataset.
 *
 * @return A chart.
 */
private static JFreeChart createChart(PieDataset dataset) {

    JFreeChart chart = ChartFactory.createPieChart(
        "Pie Chart Demo 1",  // chart title
        dataset,             // data
        true,               // include legend
        true,
        false
    );

    PiePlot plot = (PiePlot) chart.getPlot();
    plot.setSectionOutlinesVisible(false);
    plot.setLabelFont(new Font("SansSerif", Font.PLAIN, 12));
    plot.setNoDataMessage("No data available");
    plot.setCircular(false);
    plot.setLabelGap(0.02);
    return chart;
}
 
开发者ID:SpoonLabs,项目名称:astor,代码行数:26,代码来源:SWTPieChartDemo1.java

示例4: createChart

import org.jfree.chart.plot.PiePlot; //导入方法依赖的package包/类
@Override
public JFreeChart createChart(PieDataset pieDataSet, boolean createLegend) {
	JFreeChart chart = ChartFactory.createRingChart(
			null,
			pieDataSet,
			createLegend, // legend
			true,
			false);
	
	PiePlot plot = (PiePlot) chart.getPlot();
	plot.setSectionOutlinesVisible(false);
	plot.setLabelFont(new Font("SansSerif", Font.PLAIN, 11));
	plot.setNoDataMessage("No data available");
	plot.setCircular(false);
	plot.setLabelGap(0.02);

	return chart;
}
 
开发者ID:rapidminer,项目名称:rapidminer-5,代码行数:19,代码来源:RingChartPlotter.java

示例5: createChart

import org.jfree.chart.plot.PiePlot; //导入方法依赖的package包/类
@Override
public JFreeChart createChart(PieDataset pieDataSet, boolean createLegend) {
	JFreeChart chart = ChartFactory.createRingChart(null, pieDataSet, createLegend, // legend
			true, false);

	PiePlot plot = (PiePlot) chart.getPlot();
	plot.setSectionOutlinesVisible(false);
	plot.setLabelFont(new Font("SansSerif", Font.PLAIN, 11));
	plot.setNoDataMessage("No data available");
	plot.setCircular(false);
	plot.setLabelGap(0.02);

	return chart;
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:15,代码来源:RingChartPlotter.java

示例6: createChart

import org.jfree.chart.plot.PiePlot; //导入方法依赖的package包/类
@Override
public JFreeChart createChart(PieDataset pieDataSet, boolean createLegend) {
	JFreeChart chart = ChartFactory.createRingChart(null, pieDataSet, createLegend, // legend
			true, false);

	PiePlot plot = (PiePlot) chart.getPlot();
	plot.setSectionOutlinesVisible(false);
	plot.setLabelFont(FontTools.getFont(Font.SANS_SERIF, Font.PLAIN, 11));
	plot.setNoDataMessage("No data available");
	plot.setCircular(true);
	plot.setLabelGap(0.02);

	return chart;
}
 
开发者ID:rapidminer,项目名称:rapidminer-studio,代码行数:15,代码来源:RingChartPlotter.java

示例7: createChart

import org.jfree.chart.plot.PiePlot; //导入方法依赖的package包/类
/**
 * Creates a chart.
 *
 * @param dataset  the dataset.
 *
 * @return A chart.
 */
private static JFreeChart createChart(PieDataset dataset) {

    JFreeChart chart = ChartFactory.createPieChart("Pie Chart Demo 1",  
            dataset, true);
    PiePlot plot = (PiePlot) chart.getPlot();
    plot.setSectionOutlinesVisible(false);
    plot.setNoDataMessage("No data available");
    return chart;

}
 
开发者ID:SpoonLabs,项目名称:astor,代码行数:18,代码来源:PieChartDemo1.java

示例8: stylePiePlot

import org.jfree.chart.plot.PiePlot; //导入方法依赖的package包/类
/**
 * Style the plot of a pie chart.
 */
public static void stylePiePlot(PiePlot plot) {
	plot.setLabelFont(EHtmlPresentationFont.SANS_CONDENSED.getFont());
	plot.setSectionOutlinesVisible(false);
	plot.setLabelGap(0.02);
	plot.setBackgroundPaint(Color.WHITE);
}
 
开发者ID:vimaier,项目名称:conqat,代码行数:10,代码来源:PieChartCreator.java

示例9: setChar

import org.jfree.chart.plot.PiePlot; //导入方法依赖的package包/类
public void setChar(String title)
{
	jfc = ChartFactory.createPieChart(title, dataset, true, true, false);

	PiePlot pp = (PiePlot) jfc.getPlot();
	pp.setSectionOutlinesVisible(false);
	pp.setLabelFont(new Font("SansSerif", Font.PLAIN, 12));
	pp.setNoDataMessage("Nessun Dato Inserito");
	pp.setCircular(false);
	pp.setLabelGap(0.02);
}
 
开发者ID:josejamilena,项目名称:pfc-jose,代码行数:12,代码来源:jfcExample.java

示例10: createChart

import org.jfree.chart.plot.PiePlot; //导入方法依赖的package包/类
private JFreeChart createChart(PieDataset dataset) {
	JFreeChart chart = ChartFactory.createPieChart("Worker Population", // chart
																		// title
			dataset, // data
			true, // include legend
			true, false);

	PiePlot plot = (PiePlot) chart.getPlot();
	plot.setSectionOutlinesVisible(false);
	plot.setLabelFont(new Font("SansSerif", Font.PLAIN, 12));
	plot.setNoDataMessage("No data available");
	plot.setCircular(false);
	plot.setLabelGap(0.02);
	return chart;
}
 
开发者ID:CrowdsourcingGeek,项目名称:CrowdBenchmark,代码行数:16,代码来源:WorkerChartPart.java

示例11: createChart

import org.jfree.chart.plot.PiePlot; //导入方法依赖的package包/类
/**
 * Creates a chart.
 *
 * @param dataset  the dataset.
 *
 * @return A chart.
 */
private static JFreeChart createChart(PieDataset dataset) {

    JFreeChart chart = ChartFactory.createPieChart(
        "Smart Phones Manufactured / Q3 2011", dataset);

    // set a custom background for the chart
    chart.setBackgroundPaint(new GradientPaint(new Point(0, 0), 
            new Color(20, 20, 20), new Point(400, 200), Color.DARK_GRAY));

    // customise the title position and font
    TextTitle t = chart.getTitle();
    t.setHorizontalAlignment(HorizontalAlignment.LEFT);
    t.setPaint(new Color(240, 240, 240));
    t.setFont(new Font("Arial", Font.BOLD, 26));

    PiePlot plot = (PiePlot) chart.getPlot();
    plot.setBackgroundPaint(null);
    plot.setInteriorGap(0.04);
    plot.setOutlineVisible(false);

    // use gradients and white borders for the section colours
    plot.setSectionPaint("Others", createGradientPaint(new Color(200, 200, 255), Color.BLUE));
    plot.setSectionPaint("Samsung", createGradientPaint(new Color(255, 200, 200), Color.RED));
    plot.setSectionPaint("Apple", createGradientPaint(new Color(200, 255, 200), Color.GREEN));
    plot.setSectionPaint("Nokia", createGradientPaint(new Color(200, 255, 200), Color.YELLOW));
    plot.setDefaultSectionOutlinePaint(Color.WHITE);
    plot.setSectionOutlinesVisible(true);
    plot.setDefaultSectionOutlineStroke(new BasicStroke(2.0f));

    // customise the section label appearance
    plot.setLabelFont(new Font("Courier New", Font.BOLD, 20));
    plot.setLabelLinkPaint(Color.WHITE);
    plot.setLabelLinkStroke(new BasicStroke(2.0f));
    plot.setLabelOutlineStroke(null);
    plot.setLabelPaint(Color.WHITE);
    plot.setLabelBackgroundPaint(null);
    
    // add a subtitle giving the data source
    TextTitle source = new TextTitle("Source: http://www.bbc.co.uk/news/business-15489523", 
            new Font("Courier New", Font.PLAIN, 12));
    source.setPaint(Color.WHITE);
    source.setPosition(RectangleEdge.BOTTOM);
    source.setHorizontalAlignment(HorizontalAlignment.RIGHT);
    chart.addSubtitle(source);
    return chart;

}
 
开发者ID:jfree,项目名称:jfree-fxdemos,代码行数:55,代码来源:PieChartFXDemo1.java

示例12: createChart

import org.jfree.chart.plot.PiePlot; //导入方法依赖的package包/类
/**
     * Creates a chart.
     *
     * @param dataset  the dataset.
     *
     * @return A chart.
     */
    private static JFreeChart createChart(PieDataset dataset) {

        JFreeChart chart = ChartFactory.createPieChart(
            "Smart Phones Manufactured / Q3 2011",  // chart title
            dataset,            // data
            false,              // no legend
            true,               // tooltips
            false               // no URL generation
        );

        // set a custom background for the chart
        chart.setBackgroundPaint(new GradientPaint(new Point(0, 0), 
                new Color(20, 20, 20), new Point(400, 200), Color.DARK_GRAY));

        // customise the title position and font
        TextTitle t = chart.getTitle();
        t.setHorizontalAlignment(HorizontalAlignment.LEFT);
        t.setPaint(new Color(240, 240, 240));
        t.setFont(new Font("Arial", Font.BOLD, 26));

        PiePlot plot = (PiePlot) chart.getPlot();
        plot.setBackgroundPaint(null);
        plot.setInteriorGap(0.04);
//        plot.setOutlineVisible(false);

        // use gradients and white borders for the section colours
        plot.setSectionPaint("Others", createGradientPaint(new Color(200, 200, 255), Color.BLUE));
        plot.setSectionPaint("Samsung", createGradientPaint(new Color(255, 200, 200), Color.RED));
        plot.setSectionPaint("Apple", createGradientPaint(new Color(200, 255, 200), Color.GREEN));
        plot.setSectionPaint("Nokia", createGradientPaint(new Color(200, 255, 200), Color.YELLOW));
        plot.setBaseSectionOutlinePaint(Color.WHITE);
        plot.setSectionOutlinesVisible(true);
        plot.setBaseSectionOutlineStroke(new BasicStroke(2.0f));

        // customise the section label appearance
        plot.setLabelFont(new Font("Courier New", Font.BOLD, 20));
        plot.setLabelLinkPaint(Color.WHITE);
        plot.setLabelLinkStroke(new BasicStroke(2.0f));
        plot.setLabelOutlineStroke(null);
        plot.setLabelPaint(Color.WHITE);
        plot.setLabelBackgroundPaint(null);
        
        // add a subtitle giving the data source
        TextTitle source = new TextTitle("Source: http://www.bbc.co.uk/news/business-15489523", 
                new Font("Courier New", Font.PLAIN, 12));
        source.setPaint(Color.WHITE);
        source.setPosition(RectangleEdge.BOTTOM);
        source.setHorizontalAlignment(HorizontalAlignment.RIGHT);
        chart.addSubtitle(source);
        return chart;

    }
 
开发者ID:Yarichi,项目名称:Proyecto-DASI,代码行数:60,代码来源:PieChartDemo1.java

示例13: createChart

import org.jfree.chart.plot.PiePlot; //导入方法依赖的package包/类
/**
 * Creates a chart.
 *
 * @param dataset  the dataset.
 *
 * @return A chart.
 */
private static JFreeChart createChart(PieDataset dataset) {

    JFreeChart chart = ChartFactory.createPieChart(
        "Smart Phones Manufactured / Q3 2011",  // chart title
        dataset,            // data
        false,              // no legend
        true,               // tooltips
        false               // no URL generation
    );

    // set a custom background for the chart
    chart.setBackgroundPaint(new GradientPaint(new Point(0, 0), 
            new Color(20, 20, 20), new Point(400, 200), Color.DARK_GRAY));

    // customise the title position and font
    TextTitle t = chart.getTitle();
    t.setHorizontalAlignment(HorizontalAlignment.LEFT);
    t.setPaint(new Color(240, 240, 240));
    t.setFont(new Font("Arial", Font.BOLD, 26));

    PiePlot plot = (PiePlot) chart.getPlot();
    plot.setBackgroundPaint(null);
    plot.setInteriorGap(0.04);
    plot.setOutlineVisible(false);

    // use gradients and white borders for the section colours
    plot.setSectionPaint("Others", createGradientPaint(new Color(200, 200, 255), Color.BLUE));
    plot.setSectionPaint("Samsung", createGradientPaint(new Color(255, 200, 200), Color.RED));
    plot.setSectionPaint("Apple", createGradientPaint(new Color(200, 255, 200), Color.GREEN));
    plot.setSectionPaint("Nokia", createGradientPaint(new Color(200, 255, 200), Color.YELLOW));
    plot.setBaseSectionOutlinePaint(Color.WHITE);
    plot.setSectionOutlinesVisible(true);
    plot.setBaseSectionOutlineStroke(new BasicStroke(2.0f));

    // customise the section label appearance
    plot.setLabelFont(new Font("Courier New", Font.BOLD, 20));
    plot.setLabelLinkPaint(Color.WHITE);
    plot.setLabelLinkStroke(new BasicStroke(2.0f));
    plot.setLabelOutlineStroke(null);
    plot.setLabelPaint(Color.WHITE);
    plot.setLabelBackgroundPaint(null);
    
    // add a subtitle giving the data source
    TextTitle source = new TextTitle("Source: http://www.bbc.co.uk/news/business-15489523", 
            new Font("Courier New", Font.PLAIN, 12));
    source.setPaint(Color.WHITE);
    source.setPosition(RectangleEdge.BOTTOM);
    source.setHorizontalAlignment(HorizontalAlignment.RIGHT);
    chart.addSubtitle(source);
    return chart;

}
 
开发者ID:mdzio,项目名称:ccu-historian,代码行数:60,代码来源:PieChartFXDemo1.java

示例14: getPieChart

import org.jfree.chart.plot.PiePlot; //导入方法依赖的package包/类
/**
 * Creates a Pie Chart based on map.
 *
 * @return the Pie Chart generated.
 */
public JFreeChart getPieChart(Map<String, Double> pieValues) {
    DefaultPieDataset dataset = new DefaultPieDataset();

    for (String key : pieValues.keySet()) {
        dataset.setValue(key, pieValues.get(key));
    }

    JFreeChart chart = ChartFactory.createPieChart3D(
            null,  // chart title
            dataset, // data
            true,    // include legend
            true,
            false
    );

    chart.setBackgroundPaint(Color.white);
    chart.setBorderVisible(false);
    chart.setBorderPaint(null);


    PiePlot plot = (PiePlot)chart.getPlot();
    plot.setSectionOutlinesVisible(false);
    plot.setLabelFont(new Font("SansSerif", Font.BOLD, 12));
    plot.setNoDataMessage("No data available");
    plot.setCircular(true);
    plot.setLabelGap(0.02);
    plot.setOutlinePaint(null);
    plot.setLabelLinksVisible(false);

    plot.setLabelGenerator(null);

    plot.setLegendLabelGenerator(new StandardPieSectionLabelGenerator("{0}"));


    plot.setStartAngle(270);
    plot.setDirection(Rotation.ANTICLOCKWISE);
    plot.setForegroundAlpha(0.60f);
    plot.setInteriorGap(0.33);

    return chart;
}
 
开发者ID:igniterealtime,项目名称:Openfire,代码行数:47,代码来源:GraphEngine.java

示例15: createChart

import org.jfree.chart.plot.PiePlot; //导入方法依赖的package包/类
/**
 * Creates a chart.
 * 
 * @param dataset the dataset.
 * @return A chart.
 */
private static JFreeChart createChart(PieDataset dataset) {

	JFreeChart chart = ChartFactory.createPieChart("Smart Phones Manufactured / Q3 2011", // chart title
			dataset, // data
			false, // no legend
			true, // tooltips
			false // no URL generation
			);

	// set a custom background for the chart
	chart.setBackgroundPaint(new GradientPaint(new Point(0, 0), new Color(20, 20, 20), new Point(400, 200),
			Color.DARK_GRAY));

	// customise the title position and font
	TextTitle t = chart.getTitle();
	t.setHorizontalAlignment(HorizontalAlignment.LEFT);
	t.setPaint(new Color(240, 240, 240));
	t.setFont(new Font(JFreeChart.getFont(), Font.BOLD, 26));

	PiePlot plot = (PiePlot) chart.getPlot();
	plot.setBackgroundPaint(null);
	plot.setInteriorGap(0.04);
	plot.setOutlineVisible(false);

	// use gradients and white borders for the section colours
	plot.setSectionPaint("Others", createGradientPaint(new Color(200, 200, 255), Color.BLUE));
	plot.setSectionPaint("Samsung", createGradientPaint(new Color(255, 200, 200), Color.RED));
	plot.setSectionPaint("Apple", createGradientPaint(new Color(200, 255, 200), Color.GREEN));
	plot.setSectionPaint("Nokia", createGradientPaint(new Color(200, 255, 200), Color.YELLOW));
	plot.setBaseSectionOutlinePaint(Color.WHITE);
	plot.setSectionOutlinesVisible(true);
	plot.setBaseSectionOutlineStroke(new BasicStroke(2.0f));

	// customise the section label appearance
	plot.setLabelFont(new Font(JFreeChart.getFont(), Font.BOLD, 20));
	plot.setLabelLinkPaint(Color.WHITE);
	plot.setLabelLinkStroke(new BasicStroke(2.0f));
	plot.setLabelOutlineStroke(null);
	plot.setLabelPaint(Color.WHITE);
	plot.setLabelBackgroundPaint(null);

	// add a subtitle giving the data source
	TextTitle source = new TextTitle("Source: http://www.bbc.co.uk/news/business-15489523", new Font(JFreeChart.getFont(),
			Font.PLAIN, 12));
	source.setPaint(Color.WHITE);
	source.setPosition(RectangleEdge.BOTTOM);
	source.setHorizontalAlignment(HorizontalAlignment.RIGHT);
	chart.addSubtitle(source);
	return chart;

}
 
开发者ID:hongliangpan,项目名称:manydesigns.cn,代码行数:58,代码来源:PieChartDemo1.java


注:本文中的org.jfree.chart.plot.PiePlot.setSectionOutlinesVisible方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。