how to remove legend box?

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
rickyb
Posts: 2
Joined: Tue Jul 01, 2003 4:03 am

how to remove legend box?

Post by rickyb » Tue Jul 01, 2003 4:12 am

hi all. can anyone give me a quick tip on how to remove the box (just the box - the shapes+labels/text remain as they are) for the legend? 'Can't seem to find the appropriate
method for this (only saw setAnchor in the Javadoc for the location of the where the legend will go).

thx and g'day,

n3cm
Posts: 8
Joined: Tue May 13, 2003 12:40 pm

Post by n3cm » Tue Jul 01, 2003 10:39 am

You could try using the following code to blend the legend in with the chart:

Code: Select all

((StandardLegend)chart.getLegend()).setOutlinePaint(null);
        ((StandardLegend)chart.getLegend()).setBackgroundPaint(chart.getBackgroundPaint());

Locked