Getting rid of series label (XYDataSource)

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Paul Folbrecht

Getting rid of series label (XYDataSource)

Post by Paul Folbrecht » Thu May 03, 2001 11:18 pm

I don't want series labels at all. I tried setting the "names" parameter of the XYDataSource ctor as follows:

- null: Causes the chart to blow up (not surprisingly).

- new String[0]: Same as above.

- new String[] { "" }: This results in a blank label (of course) but the series icon (square) is still painted.

Is there any way to get rid of the series label entirely??

Thanks.

David Gilbert

RE: Getting rid of series label (XYDataSource)

Post by David Gilbert » Tue May 15, 2001 12:48 pm

Try the following (unless I've misunderstood what you are trying to do):

myChart.setLegend(null);

Regards,

DG.

Locked