add notes onto the chart

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

add notes onto the chart

Post by Maggie Nguyen » Thu Jan 09, 2003 9:36 pm

I would like to add a note below the x-axis title (in color or bold). Can I do that with JFreeChart APIs?

Thanks,
Maggie

David Gilbert

Re: add notes onto the chart

Post by David Gilbert » Fri Jan 10, 2003 10:30 pm

Hi Maggie,

Do you mean a subtitle for the axis? You can't do that, but it wouldn't take a big change in the axis code to allow it. Just look in the draw(...) method.

You can add a subtitle at the bottom of the chart (which will appear below the axis title), but it will not belong to the axis, and will be aligned differently. For this, use the addTitle(...) method in the JFreeChart class (you can add multiple titles to a chart, each title has a position attribute that controls where it will appear in the chart).

Regards,

Dave Gilbert

Locked