Java Code Examples for org.jfree.chart.plot.PiePlot3D#setLabelShadowPaint()
The following examples show how to use
org.jfree.chart.plot.PiePlot3D#setLabelShadowPaint() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: EyeCandySixtiesChartTheme.java From jasperreports with GNU Lesser General Public License v3.0 | 5 votes |
@Override protected JFreeChart createPie3DChart() throws JRException { JFreeChart jfreeChart = super.createPie3DChart(); PiePlot3D piePlot3D = (PiePlot3D) jfreeChart.getPlot(); JRPie3DPlot jrPiePlot = (JRPie3DPlot)getPlot(); boolean isShowLabels = jrPiePlot.getShowLabels() == null ? true : jrPiePlot.getShowLabels(); if (isShowLabels && piePlot3D.getLabelGenerator() != null) { piePlot3D.setLabelBackgroundPaint(ChartThemesConstants.TRANSPARENT_PAINT); piePlot3D.setLabelShadowPaint(ChartThemesConstants.TRANSPARENT_PAINT); piePlot3D.setLabelOutlinePaint(ChartThemesConstants.TRANSPARENT_PAINT); } piePlot3D.setDarkerSides(true); piePlot3D.setDepthFactor(0.1); // does not work for 3D // piePlot3D.setShadowXOffset(5); // piePlot3D.setShadowYOffset(10); // piePlot3D.setShadowPaint(new GradientPaint( // 0, // getChart().getHeight() / 2, // new Color(41, 120, 162), // 0, // getChart().getHeight(), // Color.white) // ); PieDataset pieDataset = piePlot3D.getDataset(); if (pieDataset != null) { for (int i = 0; i < pieDataset.getItemCount(); i++) { piePlot3D.setSectionOutlinePaint(pieDataset.getKey(i), ChartThemesConstants.TRANSPARENT_PAINT); } } piePlot3D.setCircular(true); return jfreeChart; }
Example 2
Source File: AegeanChartTheme.java From jasperreports with GNU Lesser General Public License v3.0 | 5 votes |
@Override protected JFreeChart createPie3DChart() throws JRException { JFreeChart jfreeChart = super.createPie3DChart(); PiePlot3D piePlot3D = (PiePlot3D) jfreeChart.getPlot(); JRPie3DPlot jrPiePlot = (JRPie3DPlot)getPlot(); boolean isShowLabels = jrPiePlot.getShowLabels() == null ? true : jrPiePlot.getShowLabels(); if(isShowLabels && piePlot3D.getLabelGenerator() != null) { piePlot3D.setLabelBackgroundPaint(ChartThemesConstants.TRANSPARENT_PAINT); piePlot3D.setLabelShadowPaint(ChartThemesConstants.TRANSPARENT_PAINT); piePlot3D.setLabelOutlinePaint(ChartThemesConstants.TRANSPARENT_PAINT); } piePlot3D.setDarkerSides(true); piePlot3D.setDepthFactor(0.07); //does not work for 3D // piePlot3D.setShadowXOffset(5); // piePlot3D.setShadowYOffset(10); // piePlot3D.setShadowPaint(new GradientPaint( // 0, // getChart().getHeight() / 2, // new Color(41, 120, 162), // 0, // getChart().getHeight(), // Color.white) // ); PieDataset pieDataset = piePlot3D.getDataset(); if(pieDataset != null) { for(int i = 0; i < pieDataset.getItemCount(); i++) { piePlot3D.setSectionOutlinePaint(pieDataset.getKey(i), ChartThemesConstants.TRANSPARENT_PAINT); } } piePlot3D.setCircular(true); return jfreeChart; }