mkhan523 Posted March 10, 2011 Share Posted March 10, 2011 hi,My reports contain 3D bar charts....... Can any one tell me how to make the bars cylindrical in shape???? Link to comment Share on other sites More sharing options...
szaharia Posted March 10, 2011 Share Posted March 10, 2011 Hi,For cylinder bars a cylinder renderer is needed. There is a CylinderRenderer class in the JFreeChart demo jar that can be used instead of the usual BarRenderer3D. You will need to add the demo jar to the app classpath. More on getting the demo jar you can find out on the JFreeChart site.Next, use a chart customizer to get access to the JFreeChart object.In the customize() method, replace the BarRenderer3D object in the category plot with a CylinderRenderer. For further issues or howtos related on the CylinderRenderer class, the JFreeChart forum is the best place to ask questions.Hope this helps,sandaCode:public void customize(JFreeChart chart, JRChart jasperChart){ CylinderRenderer cylinderRenderer= new CylinderRenderer(); CategoryPlot categoryPlot = (CategoryPlot)chart.getPlot(); BarRenderer3D barRenderer3D = (BarRenderer3D)categoryPlot.getRenderer(); // set all needed renderer properties here; for instance: // cylinderRenderer.setItemMargin(barRenderer3D.getItemMargin()); // etc categoryPlot.setRenderer(cylinderRenderer);} 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