Jump to content

3D bar chart scale and spaces between bars


2006 IR Open Dicussion

Recommended Posts

  • 6 months later...
  • Replies 8
  • Created
  • Last Reply

Top Posters In This Topic

People...

 

I had to implement a Customizer Class and setting it up into the "Chart Properties", attribute "Customizer class" as follow

 

I hope it helps...

 

Code:
import net.sf.jasperreports.engine.JRAbstractChartCustomizer;
import net.sf.jasperreports.engine.JRChart;

import org.jfree.chart.JFreeChart;
import org.jfree.chart.plot.CategoryPlot;
import org.jfree.chart.renderer.category.BarRenderer;

public class CustomizeBarChart extends JRAbstractChartCustomizer {

public void customize(JFreeChart chart, JRChart jasperChart) {
CategoryPlot categoryPlot = chart.getCategoryPlot();
BarRenderer renderer = (BarRenderer) categoryPlot.getRenderer();

//Spaces between bars
renderer.setItemMargin(0.03);
}
}
Link to comment
Share on other sites

  • 4 years later...
  • 1 year later...

Hi mdahlman,

 

Sorry for the late comment.

 

Even i am trying to reduce the space between the bars.

 

I am using I-Report 4.5.1

 

after giving the "" also the gap between the bars are not reducing.

 

Could you please provide me a sample jrxml for the same.<<<<<< This comment was blocked and unpublished because Project Honeypot indicates it came from a suspicious IP address.

Link to comment
Share on other sites

  • 9 months later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...