Jump to content

How to hide borders (domain axis, legend, labels) in iReport charts?


CharleyDC5

Recommended Posts

Hi guys,

Is it possible to hide the border of labels and legends in iReport without having to create a custom chart theme?

If not, I just can't find a way to hide the borders using the chart theme editor. I know this is feasable as the aegean built in theme has no borders.

Thanks

Charles

Link to comment
Share on other sites

  • 2 months later...
  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

I had the same requirement  and would call this a a hack but it works well.  In my case, I have an XY scatter chart which I then overlay on top of a graphic but wanted to no show any of the chart details other than the plot lines.  Turn off the X & Y tick labels checkbox and then set all the axis colors and labels to white.  Don't laugh, it works.

Link to comment
Share on other sites

  • 9 years later...

You can write customizer class for hide border of legends

Below customizer class code for hide border of legends 

Code:

import org.jfree.chart.JFreeChart;
import net.sf.jasperreports.engine.JRChart;
import net.sf.jasperreports.engine.JRChartCustomizer;

public class customLegendBorder implements JRChartCustomizer{

    public void customize(JFreeChart chart, JRChart jasperChart){
        
        if(chart.getLegend()!=null)
         {
          chart.getLegend().setBorder(0.0, 0.0, 0.0, 0.0);    
         }
        
        }
}

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