Legend Location

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
mlynn
Posts: 2
Joined: Mon Feb 11, 2008 4:40 pm

Legend Location

Post by mlynn » Mon Feb 11, 2008 4:53 pm

Is there any way to move the legend around so it's not always anchored to the bottom of the chart? For example, is there any way to get the legend to be to the right of the plot area?

Wetzerk
Posts: 14
Joined: Thu Feb 07, 2008 3:54 pm

Post by Wetzerk » Mon Feb 11, 2008 5:41 pm

Looks like the most straight forward way is to create your own legend
http://www.jfree.org/jfreechart/api/jav ... Title.html

Check out one of Dave's examples to see it in use
http://www.jroller.com/dgilbert/entry/ouch

Look for this (I assume you want something different)
legend.setPosition(RectangleEdge.BOTTOM);

mlynn
Posts: 2
Joined: Mon Feb 11, 2008 4:40 pm

Post by mlynn » Mon Feb 11, 2008 8:23 pm

Thanks, that's exactly what I was trying to do.

Locked