Hi,
How to add note (some text) to graph under the X-axis label.
Thanks,
Ram
Add note (some text) to graph under the X-axis label
Hi,
Use TextTitle class to add text anywhere on the graph. The following code will help:
TextTitle chartinfo = new TextTitle( "Chart Info" );
chartinfo.setPosition( TextTitle.BOTTOM ); // position the title below X axis
chartinfo.setHorizontalAlignment( TextTitle.LEFT ); // set the horizontal alignment
chart.addSubtitle( chartinfo ); // Here chart is the instance of JFreeChart
Similarly you may also add LegendTitle or ImageTitle.
Enjoy !!!
- Rana
Use TextTitle class to add text anywhere on the graph. The following code will help:
TextTitle chartinfo = new TextTitle( "Chart Info" );
chartinfo.setPosition( TextTitle.BOTTOM ); // position the title below X axis
chartinfo.setHorizontalAlignment( TextTitle.LEFT ); // set the horizontal alignment
chart.addSubtitle( chartinfo ); // Here chart is the instance of JFreeChart
Similarly you may also add LegendTitle or ImageTitle.
Enjoy !!!
- Rana