XYSeries without labels

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
ajgwin
Posts: 18
Joined: Mon Mar 17, 2003 4:53 pm

XYSeries without labels

Post by ajgwin » Mon Jun 16, 2003 5:38 pm

I have a series defined below:

XYSeries series = new XYSeries("");
XYSeriesCollection dataset = new XYSeriesCollection();

xaxislabel = "Final Skyline--Azimuth";

series = new XYSeries("");

I really don't want any labels to appear at the bottom of the graph with the color and a label. I would really like the series definition to be:

series = new XYSeries();

Is there a way to do this? When I do the above (""), I still get a little blue box at the bottom. I have a graph that has 2 different colors, but I don't want them labeled. Is this possible? Thanks.

Allyson

jenarchie
Posts: 2
Joined: Thu Jun 12, 2003 2:46 pm
Location: Detroit, MI, USA

Re: XYSeries without labels

Post by jenarchie » Tue Jun 17, 2003 1:55 pm

Are you talking about the legend? It doesn't sound like you've turned off its display. Either set the chart legend to null or set the legend's visibility to false.

Or do you mean you want absolutely nothing to display on the x-axis: tickmarks, domain label et al? Set the domain label to null, tickmark (label) displays to false.

Don't pass a null label name to XYSeries, you'll get a runtime NullPointerException if you forget to set legend to null and the chart tries to make one.

cheers.

ajgwin
Posts: 18
Joined: Mon Mar 17, 2003 4:53 pm

Post by ajgwin » Tue Jun 17, 2003 3:17 pm

Thank you. I wanted the legend turned off. That worked when I set it to false. Thanks again.

Allyson

Locked