当前位置: 首页>>代码示例>>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;未经允许,请勿转载。