daad.madhusudan Posted July 1, 2015 Share Posted July 1, 2015 I am working on a jasper report which contains Pie chart. And the chart is occupying entire summary band. When I run this report the chart is compressed and legend box is taking almost more than half of the space. Chart looks like as shown in the image: Here is my customizer java class: public class DocumentUploadPieChart implements JRChartCustomizer { @Overridepublic void customize(JFreeChart chart, JRChart jasperChart) {Plot plot1 = chart.getPlot();if (plot1 instanceof PiePlot) {PiePlot piePlot = (PiePlot) plot1; Font font = new Font("Calibri", Font.PLAIN, 11); piePlot.setLabelFont(font); piePlot.setCircular(Boolean.TRUE); piePlot.setLabelOutlinePaint(null); piePlot.setLabelShadowPaint(null); chart.getLegend().setBackgroundPaint(null); chart.getLegend().setWidth(30); chart.getLegend().setBorder(0.0, 0.0, 0.0, 0.0); piePlot.setShadowPaint(null); } } } I tried to adjust width of legend but its still giving same output. Can someone please help me to resolve this issue? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now