當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。