Note that for radar chart, there is no X-axis title.
Chart
Title To set the Main Title, first
create an ITextString object that has a handle on the chart's Main Title.
Then, the font properties can be modified through the methods in the ITextString
class.
Insert Title // create an ITextString object, “hMainTitle”, that // has a handle on the chart’s Main Title ITextString hMainTitle = chart.gethMainTitle();
// set Main Title to “Sample Chart” hMainTitle.setValue("Sample Chart");
Set Font, Style, Size,
text Angle // set Main Title font properties hMainTitle.setFont( new Font("TIMES_ROMAN", Font.BOLD, 22) );
// set Main Title text angle to 30 degrees, counterclockwise hMainTitle.setAngle( 30 );
Set Colors // set Main Title text color to red hMainTitle.setColor( Color.red );Set Position // use “setPosition” method to specify relative position hMainTitle.setPosition( new Position( (float)0.3, (float) 0.85
));Axis Titles To set the Axis Title, first
get the handle of the desired Axis and create an Object of ITextString
that has the handle on the Title. Then, the font properties can be modified
through the methods in the ITextString class.
// create an IAxis object, “hXAxis”, that // has a handle on the chart’s X-Axis IAxis hXAxis = chart.gethXAxis();
Insert Title // create an ITextString object, “hXTitle”, that // has a handle on the X-Axis’ Title ITextString hXTitle = hXAxis.gethTitle();
// set X-Axis Title to “Sample X-Title” hXTitle.setValue("Sample X-Title");
Set Font, Style, Size,
text Angle // set X-Axis Title font properties hXTitle.setFont( new Font("TIMES_ROMAN", Font.BOLD, 22) );
// set X-Axis Title text angle to 30 degrees, counterclockwise hXTitle.setAngle( 30 );
Set Colors // set X-Axis Title text color to red hXTitle.setColor( Color.red );Set Position // “adjust” the position of the XAxis Title by calling “setOffset”
method. // Dimension (int width, int height) hXTitle.setOffset( new Dimension( 3,9) );Please refer to
QbChart,
ITextString,
& IAxis in EspressChart
APIDocs for additional information.