reduce space between pieplot and legend

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
nutan

reduce space between pieplot and legend

Post by nutan » Mon Aug 19, 2002 9:40 pm

HI,

I am displaying the legend to the EAST of the pie plot and have set the following below

plot.setSectionLabelType(plot.NO_LABELS);
plot.setBackgroundPaint(null);
plot.setOutlinePaint(null);

This makes the border around the plot disappear and makes the background white, but I notice that I have a lot of white space between the legend and the chart
is there a way to reduce the white space that is in the middle.

Thanks
-Nutan

David Gilbert

Re: reduce space between pieplot and legend

Post by David Gilbert » Thu Aug 22, 2002 11:19 am

The white space can come from two places:

1) the insets for the plot (basically white space around the outside);

2) the interior gap percent (controlled by the setInteriorGapPercent(...) method). This is a fairly crude mechanism for leaving space for the section labels...crude because it doesn't auto-adjust for the size of the labels. Set it to something smaller if you want to, but watch those labels.

Regards,

DG.

Locked