One problem remaining with my legend

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
tedbyers
Posts: 50
Joined: Fri Oct 12, 2007 7:05 pm

One problem remaining with my legend

Post by tedbyers » Thu Jun 04, 2009 9:45 pm

OK, after a little trial and tribulation, I have it all working, as far as my legend goes. The lines on the chart are fine, and their respective colours are easy to identify. However, the lines used for the legend are much too short and thin for me to easily see what the colour is. How does one thicken the lines used in the legend (and only in the legend)?

Thanks.

Ted

paradoxoff
Posts: 1634
Joined: Sat Feb 17, 2007 1:51 pm

Re: One problem remaining with my legend

Post by paradoxoff » Fri Jun 05, 2009 7:36 am

Does

Code: Select all

AbstractRenderer.setLegendShape(int series, Shape shape)
or

Code: Select all

XYLineAndShapeRenderer.setLegendLine(Shape line);
do the trick?

tedbyers
Posts: 50
Joined: Fri Oct 12, 2007 7:05 pm

Re: One problem remaining with my legend

Post by tedbyers » Wed Jun 10, 2009 3:58 pm

Thanks for your reply.

These options help, but don't quite solve the problem.

Code: Select all

XYLineAndShapeRenderer.setLegendLine(Shape line);
almost does it, but what I get is a rectangle with the border in the colour and the interior white.

But I made it servicable by using a height argument equal to 1. That creates the illusion that it is a line that is twice as thick as what I got by default. At least I can now see the line and what colour it is.

Thanks

Ted

Locked