當前位置: 首頁>>代碼示例>>Java>>正文


Java PiePlot.setLabelShadowPaint方法代碼示例

本文整理匯總了Java中org.jfree.chart.plot.PiePlot.setLabelShadowPaint方法的典型用法代碼示例。如果您正苦於以下問題:Java PiePlot.setLabelShadowPaint方法的具體用法?Java PiePlot.setLabelShadowPaint怎麽用?Java PiePlot.setLabelShadowPaint使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.jfree.chart.plot.PiePlot的用法示例。


在下文中一共展示了PiePlot.setLabelShadowPaint方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: setPieRender

import org.jfree.chart.plot.PiePlot; //導入方法依賴的package包/類
public static void setPieRender(Plot plot) {

        plot.setNoDataMessage(NO_DATA_MSG);
        plot.setInsets(new RectangleInsets(10, 10, 5, 10));
        PiePlot piePlot = (PiePlot) plot;
        piePlot.setInsets(new RectangleInsets(0, 0, 0, 0));
        piePlot.setCircular(true);

        piePlot.setLabelGap(0.01);
        piePlot.setInteriorGap(0.05D);
        piePlot.setLegendItemShape(new Rectangle(10, 10));
        piePlot.setIgnoreNullValues(true);
        piePlot.setLabelBackgroundPaint(null);
        piePlot.setLabelShadowPaint(null);
        piePlot.setLabelOutlinePaint(null);
        piePlot.setShadowPaint(null);
        // 0:category 1:value:2 :percentage
        piePlot.setLabelGenerator(new StandardPieSectionLabelGenerator("{0}:{2}"));
    }
 
開發者ID:Fanping,項目名稱:iveely.ml,代碼行數:20,代碼來源:ChartUtils.java

示例2: setBackground

import org.jfree.chart.plot.PiePlot; //導入方法依賴的package包/類
private void setBackground(JFreeChart chart, Plot plot) {
	//Color bg = backgroundcolor==null?databackgroundcolor:backgroundcolor;

	chart.setBackgroundPaint(backgroundcolor);
	plot.setBackgroundPaint(databackgroundcolor);
	chart.setBorderPaint(databackgroundcolor);
	
	
       plot.setOutlineVisible(false);
	
	// Pie
	if(plot instanceof PiePlot) {
		PiePlot pp=(PiePlot) plot;
		pp.setLabelOutlinePaint(backgroundcolor); 
        pp.setLabelBackgroundPaint(backgroundcolor);
        pp.setLabelShadowPaint(backgroundcolor);
        pp.setShadowPaint(backgroundcolor);
	}
	// Bar
	/*if(plot instanceof CategoryPlot) {
		CategoryPlot cp=(CategoryPlot) plot;
		
	}*/
}
 
開發者ID:lucee,項目名稱:Lucee4,代碼行數:25,代碼來源:Chart.java

示例3: createPieChart

import org.jfree.chart.plot.PiePlot; //導入方法依賴的package包/類
@Override
protected JFreeChart createPieChart() throws JRException
{
	JFreeChart jfreeChart = super.createPieChart();
	PiePlot piePlot = (PiePlot)jfreeChart.getPlot();
	JRPiePlot jrPiePlot = (JRPiePlot)getPlot();
	boolean isShowLabels = jrPiePlot.getShowLabels() == null ? true : jrPiePlot.getShowLabels().booleanValue();

	if (isShowLabels && piePlot.getLabelGenerator() != null)
	{
		piePlot.setLabelBackgroundPaint(ChartThemesConstants.TRANSPARENT_PAINT);
		piePlot.setLabelShadowPaint(ChartThemesConstants.TRANSPARENT_PAINT);
		piePlot.setLabelOutlinePaint(ChartThemesConstants.TRANSPARENT_PAINT);
	}
	piePlot.setShadowXOffset(5);
	piePlot.setShadowYOffset(10);
	piePlot.setShadowPaint(new GradientPaint(0, getChart().getHeight() / 2, new Color(41, 120, 162), 0, getChart().getHeight(), Color.white));
	PieDataset pieDataset = piePlot.getDataset();
	if (pieDataset != null)
	{
		for (int i = 0; i < pieDataset.getItemCount(); i++)
		{
			piePlot.setSectionOutlinePaint(pieDataset.getKey(i), ChartThemesConstants.TRANSPARENT_PAINT);
			//makes pie colors darker
			//piePlot.setSectionPaint(pieDataset.getKey(i), GRADIENT_PAINTS[i]);
		}
	}
	
	piePlot.setCircular(true);
	return jfreeChart;
}
 
開發者ID:TIBCOSoftware,項目名稱:jasperreports,代碼行數:32,代碼來源:EyeCandySixtiesChartTheme.java

示例4: createPieChart

import org.jfree.chart.plot.PiePlot; //導入方法依賴的package包/類
@Override
protected JFreeChart createPieChart() throws JRException
{
	JFreeChart jfreeChart = super.createPieChart();

	PiePlot piePlot = (PiePlot)jfreeChart.getPlot();
	JRPiePlot jrPiePlot = (JRPiePlot)getPlot();
	boolean isShowLabels = jrPiePlot.getShowLabels() == null ? true : jrPiePlot.getShowLabels().booleanValue();

	if(isShowLabels && piePlot.getLabelGenerator() != null)
	{
		piePlot.setLabelBackgroundPaint(ChartThemesConstants.TRANSPARENT_PAINT);
		piePlot.setLabelShadowPaint(ChartThemesConstants.TRANSPARENT_PAINT);
		piePlot.setLabelOutlinePaint(ChartThemesConstants.TRANSPARENT_PAINT);
	}
	piePlot.setShadowXOffset(0);
	piePlot.setShadowYOffset(0);
	PieDataset pieDataset = piePlot.getDataset();
	if(pieDataset != null)
	{
		for(int i = 0; i < pieDataset.getItemCount(); i++)
		{
			piePlot.setSectionOutlinePaint(pieDataset.getKey(i), ChartThemesConstants.TRANSPARENT_PAINT);
			
			//makes pie colors darker
			//piePlot.setSectionPaint(pieDataset.getKey(i), GRADIENT_PAINTS[i]);
		}
	}
	piePlot.setCircular(true);
	return jfreeChart;
}
 
開發者ID:TIBCOSoftware,項目名稱:jasperreports,代碼行數:32,代碼來源:AegeanChartTheme.java


注:本文中的org.jfree.chart.plot.PiePlot.setLabelShadowPaint方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。