Title set visible?

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
devent
Posts: 4
Joined: Sat Dec 25, 2010 3:18 am
antibot: No, of course not.

Title set visible?

Post by devent » Thu Jun 30, 2011 3:06 pm

Hello,
I want to show/hide the title of the graph. Why is the code not working:

Code: Select all

chart.getTitle().setVisible(showTitle);
I.e. the code does not hide the title if a title was present.

If I do

Code: Select all

chart.setTitle("");
the old title is hidden. But if I do

Code: Select all

chart.setTitle(oldTitle);
the old title is not shown.

As I see there is no way to show/hide the title of a graph without to re-create the whole JFreeChart?

Regards, Erwin.

Locked