pradeepvbe Posted November 15, 2013 Share Posted November 15, 2013 Hi All,I want to generate a Dynamic report where the data are coming from the database with bar 3d graph, can anyone help me how to do this?? Link to comment Share on other sites More sharing options...
Java_Jasper Posted November 15, 2013 Share Posted November 15, 2013 Hello,JR does no have this functionality, you will need to use JFreeChart along with JRs "Chart Customizers" Here is an example:The Class:package yourPackage; import org.jfree.chart.JFreeChart;import org.jfree.chart.axis.CategoryAxis;import org.jfree.chart.axis.LogarithmicAxis; import net.sf.jasperreports.engine.JRAbstractChartCustomizer;import net.sf.jasperreports.engine.JRChart;public class MyChartCustomizerLogXAxis extends JRAbstractChartCustomizer { JFreeChart chart; public void customize(JFreeChart chart, JRChart jrChart);}public void customize(JFreeChart chart, JRChart jrChart) { final CategoryAxis categoryAxis = new CategoryAxis("Category"); final ValueAxis valueAxis = new LogarithmicAxis("Percentage (%)"); this.chart = chart; LogarithmicAxis logScale = new LogarithmicAxis("Percentage (%)"); logScale.setStrictValuesFlag(false); logScale.setAutoTickUnitSelection(true); logScale.autoAdjustRange(); chart.getCategoryPlot().setRangeAxis(logScale); categoryAxis.setUpperMargin(0.5); }You will however need to customize this for your needs, hope it helps Enjoy! Link to comment Share on other sites More sharing options...
pradeepvbe Posted November 16, 2013 Author Share Posted November 16, 2013 Thank you so much i appreciate your reply... thank you... :) Link to comment Share on other sites More sharing options...
Java_Jasper Posted November 19, 2013 Share Posted November 19, 2013 If this was the correct answer make sure you mark it as so. B. 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