![](http://content.invisioncic.com/i328763/set_resources_3/84c1e40ea0e759e3f1505eb1788ddf3c_pattern.png)
neils
-
Posts
4 -
Joined
-
Last visited
Content Type
Forum
Downloads
Featured Visualizations
Knowledge Base
Documentation (PDF Downloads)
Blog
Documentation (Test Area)
Documentation
Dr. Jaspersoft Webinar Series
Security Advisories
Events
Profiles
Posts posted by neils
-
-
Broken link!
-
I am looking for a solution to this as well but the link listed is broken...
-
Hi Teodor,
I tried to use the Customizer as specified in this post but it isn't working for me. Here's the code I tried:
public class PieChartCustomizer implements JRChartCustomizer
{
@Override
public void customize(JFreeChart jFreeChart, JRChart jrChart)
{
PiePlot piePlot = (PiePlot) jFreeChart.getPlot();
StandardPieSectionLabelGenerator labelGenerator
= new StandardPieSectionLabelGenerator("{0} {2}");
piePlot.setLabelGenerator(labelGenerator);
piePlot.setLegendLabelGenerator(labelGenerator);
}
}
Then implementing the class like this:
JRDesignChart jrPieChart = new JRDesignChart(jasperDesign,net.sf.jasperreports.engine.JRChart.CHART_TYPE_PIE);
...
jrPieChart.setCustomizerClass("PieChartCustomizer");
...
As soon as that last line to setCustomizerClass runs that's the last I see of the method.
What am I doing wrong?
Thanks in advance for your help.
Display percentage in pie chart
in Products
Posted
Hi Teodor,
I tried to use the Customizer as specified in this post but it isn't working for me. Here's the code I tried:
public class PieChartCustomizer implements JRChartCustomizer
{
@Override
public void customize(JFreeChart jFreeChart, JRChart jrChart)
{
PiePlot piePlot = (PiePlot) jFreeChart.getPlot();
StandardPieSectionLabelGenerator labelGenerator
= new StandardPieSectionLabelGenerator("{0} {2}");
piePlot.setLabelGenerator(labelGenerator);
piePlot.setLegendLabelGenerator(labelGenerator);
}
}
Then implementing the class like this:
JRDesignChart jrPieChart = new JRDesignChart(jasperDesign,net.sf.jasperreports.engine.JRChart.CHART_TYPE_PIE);
...
jrPieChart.setCustomizerClass("PieChartCustomizer");
...
As soon as that last line to setCustomizerClass runs that's the last I see of the method.
What am I doing wrong?
Thanks in advance for your help.