"Category 1"

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

"Category 1"

Post by jw » Tue Aug 27, 2002 10:02 pm

I'm using JFreeChart to create a "vertical bar chart" with only one category.

I have been unable to determine where the "default" label value (below the horizontal axis)...

"Category 1"

...is generated

(-- I want to eliminate this label, since the bar chart I'm creating does not have multiple categories)

Can anyone tell me what class/method I can invoke/override to prevent this label?

Thanks for any help on this.

jw

David Gilbert

Re: "Category 1"

Post by David Gilbert » Tue Aug 27, 2002 10:09 pm

The following code should hide the category labels:

CategoryPlot plot = myChart.getCategoryPlot();
Axis axis = plot.getDomainAxis();
axis.setTickLabelsVisible(false);

Regards,

DG.

jw

Re: "Category 1"

Post by jw » Wed Aug 28, 2002 3:08 pm

Hi DG

Thanks for your help.

I feel a little sheepish for not looking more deeply and experimenting with this particular method.

I just didn't intuit any relationship between the method name - setTickLabelsVisible - and this particular label...(I certainly won't forget, though).

Thanks again!

jw

Locked