Changing title font

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

Changing title font

Post by Sridhar Ramasami » Fri Feb 28, 2003 5:24 pm

Hi,

I am having a basic problem while trying to change the font size of the titles.

I create my chart with:

JFreeChart chart1 = ChartFactory.createTimeSeriesChart(chartTitle1, "Date", "Price", dataset1, true);

I then try to set the TextTitle by:

TextTitle tt = new TextTitle("chartTitle1", font);
chart1.setTitle(tt);

where i get a compile error of:
cannot resolve symbol
symbol: method setTitle(com.refinery.chart.TextTitle)
location: class com.jrefinery.chart.JFreeChart
chart1.setTitle(tt);

The documentation shows setTitle(TextTitle) to be a valid JFreeChart method. What am i doing wrong?

Thanks,
Sridhar

David Gilbert

Re: Changing title font

Post by David Gilbert » Tue Mar 04, 2003 10:34 am

What version of JFreeChart are you using? The setTitle(...) method was added in 0.9.5 when the list of titles was divided into a single title, plus a list of subtitles.

Regards,

Dave Gilbert

Sridhar Ramasami

Re: Changing title font

Post by Sridhar Ramasami » Fri Mar 07, 2003 6:53 am

Hi Dave,

I am using version 0.9.4. I will download and install 0.9.5 and let you know if it solved the problem.

Thanks,
Sridhar

Locked