Jump to content

Changing the border color of 3D bar charts


tknowlton

Recommended Posts

 I am generating some charts using iReport/jasperreport 3.0.0 (upgrade plans are in the works) and everything seems to be generating and formatting correctly.  However the 3D bar charts that I have put together all have a gray border around the actual bars drawn on the graph.  I have looked for properties that would adjust these particular edges, but have so far been unsuccessful.  Can anyone point me to the correct settings, or at least let me know that I'm wasting my time looking?

 

Thanks

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Jasper Reports only exposes a subset of JFreeCharts API. To change other items you need to create a Java Class that extends JRAbstractChartCustomizer.

This code removes the grey line on a normal bar chart

public

{

 

{

 

class MyChartCustomizer extends JRAbstractChartCustomizerpublic void customize(JFreeChart chart, JRChart jasperChart)//Chart is a bar chart

 

 

BarRenderer renderer = (BarRenderer) chart.getCategoryPlot().getRenderer();

 

 

if(jasperChart.getChartType() == JRChart.CHART_TYPE_BAR) {//Removes gray line around the bar

renderer.setDrawBarOutline(

 

false);

 

}

....

 

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