TimesSeries: Random Legend Issue where legend text overlaps

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
rafidwahab
Posts: 5
Joined: Fri Oct 26, 2007 8:02 pm

TimesSeries: Random Legend Issue where legend text overlaps

Post by rafidwahab » Fri Jun 29, 2012 10:03 pm

I have a webapplication that generated TimeSeries Chart and every so often the Legend text for the series overlaps into each other and its not readable. Once this occurs all requests following continue to have the same issue.

The only resolution has been to bounce the webapp or server.

Has anyone encountered this?
We do set the values of the legend ourselves as we want to maximize the number of legends to display.
This is the only change/setting we do to the Legend.

Code: Select all

LegendItemCollection legendItems = render.getLegendItems();
				Iterator legendIter = legendItems.iterator();
				String keyId = null;
				while (legendIter.hasNext()) {
					LegendItem item = (LegendItem) legendIter.next();
					if (legends.getItemCount() < getMaxLegendsToShow()) {
						legends.add(item);
 					} else {
					  break;
					}
				}.....
			}
Thanks,
Rafid

Locked