Jump to content
Changes to the Jaspersoft community edition download ×

Values of a bars graphic


Simgen

Recommended Posts

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

You will have to create your own class that extends JRAbstractChartCustomizer or JRChartCustomizer.

 

You will have to check out the JFreeChart API to figure out what you need to access

 

http://www.jfree.org/jfreechart/api/javadoc/index.html

 

Here's a link to thier forum

 

http://www.jfree.org/phpBB2/index.php

 

Here's some code to get you started

 

Code:


public class JasperChartCustomizer extends JRAbstractChartCustomizer
{

public void customize(JFreeChart chart, JRChart jasperChart)
{
//Chart is a bar chart
if(jasperChart.getChartType() == JRChart.CHART_TYPE_BAR)
{

... set up a formatter
... set the format on your item

}

}
}
Link to comment
Share on other sites

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...