pentaloc Posted July 9, 2012 Share Posted July 9, 2012 Good Morning :) I have a problem with my Bar Chart. As you can see on my attached file, the gap between the several Bars isto small to get a good overview.Can i change this gap with the chart customizer? Unfortunately i found nothing ;( Thank you in advance! :)pentaLoc Link to comment Share on other sites More sharing options...
pentaloc Posted July 10, 2012 Author Share Posted July 10, 2012 Okay, after a bit more searching i found some pages about my problem. http://mdahlman.wordpress.com/2011/04/17/chart-customizers-2/ :Here i have to ad "" to my report. I added this tag at the beginning to the other properties but nothing happened.http://community.jaspersoft.com/questions/512986/3d-bar-chart-scale-and-spaces-between-barsHere is the solution a java class. But how can I add this code to the customizer class? Should I write this code into a java class and then copy this to the report?Okay...you see i´m a newbie :D Link to comment Share on other sites More sharing options...
pentaloc Posted July 10, 2012 Author Share Posted July 10, 2012 I have solved my problem after a long time of trying :D For everyone who have the same problem and need some help here is my solution:1. I wrote a java class with eclipse (see the code)2. Exported this as a .jar file3. Add this jar under options -> classpath4. Change the propertie of the selected bar chart -> Customizer Class -> CustomizeBarChart5. Finish Solution for usage with jasperserver:1. I have to replace the java folder in the jasperresports folder with the jdk i`m using with eclipse (okay, i could changethe java_home in the .bat files, but this dosen`t worked fine for me..)2. Add the jar "CustomizeMe.jar" as resources to the report3. If the customizer class is already added you are finished :) I hope this helps someone and sorry for my bad english ;D Code: Link to comment Share on other sites More sharing options...
tihomir.vuckovic Posted January 30, 2014 Share Posted January 30, 2014 I followed all steps but when I start Jasper report, I'm getting this error: Error filling print... org.jfree.chart.plot.XYPlot cannot be cast to org.jfree.chart.plot.CategoryPlot java.lang.ClassCastException: org.jfree.chart.plot.XYPlot cannot be cast to org.jfree.chart.plot.CategoryPlot at org.jfree.chart.JFreeChart.getCategoryPlot(JFreeChart.java:830) at CustomizeBarChart1.customize(CustomizeBarChart1.java:12) at net.sf.jasperreports.engine.fill.JRFillChart.evaluateChart(JRFillChart.java:1345) at net.sf.jasperreports.engine.fill.JRFillChart.evaluateRenderer(JRFillChart.java:1305) at net.sf.jasperreports.engine.fill.JRFillChart.evaluate(JRFillChart.java:1294) at net.sf.jasperreports.engine.fill.JRFillElementContainer.evaluate(JRFillElementContainer.java:258) at net.sf.jasperreports.engine.fill.JRFillBand.evaluate(JRFillBand.java:499) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillSummaryNoLastFooterSamePage(JRVerticalFiller.java:1065) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillSummary(JRVerticalFiller.java:1030) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportEnd(JRVerticalFiller.java:300) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:134) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:942) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:841) at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:58) at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:417) at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:247) at com.jaspersoft.ireport.designer.compiler.IReportCompiler.run(IReportCompiler.java:877) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572) at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997) Print not filled. Try to use an EmptyDataSource... Link to comment Share on other sites More sharing options...
hadv Posted April 15, 2014 Share Posted April 15, 2014 That's mean your chart type is not bar chart type. Please re-check! Link to comment Share on other sites More sharing options...
hadv Posted April 15, 2014 Share Posted April 15, 2014 You should use XYPlot, instead of CategoryPlot 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