Arrange multiple legends vertically on right side of chart

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
dnater
Posts: 3
Joined: Tue Mar 08, 2011 7:06 pm
antibot: No, of course not.

Arrange multiple legends vertically on right side of chart

Post by dnater » Wed May 18, 2011 6:46 pm

Hello,

I would like to arrange multiple legends (or subtitles) along the right edge of a plot. Adding a second legend using the following code results in the 2 legends side by side, rather than on top of each other.

Code: Select all

LegendTitle lt = new LegendTitle(new LegendLikePlotAnnotation());
lt.setFrame(new BlockBorder(Color.BLACK));
lt.setPosition(RectangleEdge.RIGHT);
chart.addLegend(lt);
I would like the two legends to be "stacked" in a column, rather than laid out in a row. Thanks for your help.

Locked