Legend problem

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
alsw-2000
Posts: 16
Joined: Thu May 22, 2003 12:53 pm

Legend problem

Post by alsw-2000 » Sat Feb 07, 2004 3:10 am

My legend has more then 10 legend items.
I want to limit the width of the legend by seperate the items into more rows, so that no legend items will show under the y-axis's label.

Is there any method to set the width of the legend?
or set maximun number of legend items in a row?

I have already search through this forum but just can't find the answer. >.<

Regards,
Andy

david.gilbert
JFreeChart Project Leader
Posts: 11734
Joined: Fri Mar 14, 2003 10:29 am
antibot: No, of course not.
Contact:

Post by david.gilbert » Mon Feb 09, 2004 6:18 pm

No. The legend code needs work.
David Gilbert
JFreeChart Project Leader

:idea: Read my blog
:idea: Support JFree via the Github sponsorship program

John_Robert

Another legend question

Post by John_Robert » Mon Feb 09, 2004 11:14 pm

Is there a way to remove a legend entry from the legend?
If not, is there a way to plot a "reference line" on a plot w/out
having the "series" used to create a "reference line"
showing up in the legend?

david.gilbert
JFreeChart Project Leader
Posts: 11734
Joined: Fri Mar 14, 2003 10:29 am
antibot: No, of course not.
Contact:

Post by david.gilbert » Tue Feb 10, 2004 10:29 am

The only way to change the items that appear in the legend (for now) is to override the getLegendItems() method in the plot.

You can put reference lines on a plot using the addDomainMarker() and addRangeMarker() methods.
David Gilbert
JFreeChart Project Leader

:idea: Read my blog
:idea: Support JFree via the Github sponsorship program

Locked