ChartTitleOptions Class
Contains settings for an axis title in a standard chart.
Declaration
public class ChartTitleOptions extends ChartTitleOptionsBase
Remarks
Call the Axis.getTitle() method to access the title settings of an axis. To add a title to an axis, pass a ChartTitleOptions object to the Axis.setTitle(value) method. To remove the axis title, call the Axis.setTitle(null) method.
A title displays custom text (ChartTitleOptions.getCustomText()) or text from a chart data reference (ChartTitleOptions.getTextReference()). If the title has no custom text and no text reference, the chart displays automatic title text. Specify custom text formatting in the TextArea object. Call the setTextProperties(TextProperties value) method to format referenced or automatic title text.
The ChartTitle class derives from the ChartTitleOptions class and contains settings for a chart title.
Refer to the following help topic for additional information: Customize Chart Axes — Presentation API for Java.
Inherited Members
Inheritance
Constructors
ChartTitleOptions(IChartDataReference reference, TextProperties textProperties) Constructor
Initializes a new instance of the ChartTitleOptions class with the specified text reference and text formatting settings.
Declaration
public ChartTitleOptions(IChartDataReference reference, TextProperties textProperties)
Parameters
| Name | Type | Description |
|---|---|---|
| reference | IChartDataReference | A chart data reference to the title text. |
| textProperties | TextProperties | Text formatting settings for the referenced title text. |
ChartTitleOptions(IChartDataReference reference) Constructor
Initializes a new instance of the ChartTitleOptions class with the specified text reference.
Declaration
public ChartTitleOptions(IChartDataReference reference)
Parameters
| Name | Type | Description |
|---|---|---|
| reference | IChartDataReference | A chart data reference to the title text. |
ChartTitleOptions(String text) Constructor
Initializes a new instance of the ChartTitleOptions class with the specified title text.
Declaration
public ChartTitleOptions(String text)
Parameters
| Name | Type | Description |
|---|---|---|
| text | String | The title text. |
ChartTitleOptions(TextArea textArea) Constructor
Initializes a new instance of the ChartTitleOptions class with the specified custom text.
Declaration
public ChartTitleOptions(TextArea textArea)
Parameters
| Name | Type | Description |
|---|---|---|
| textArea | TextArea | Custom title text. |
Methods
deepClone() Method
Returns a deep copy of this ChartTitleOptions instance.
Declaration
public ChartTitleOptions deepClone()
Returns
| Type | Description |
|---|---|
ChartTitleOptions |
A deep copy of this |
getLayout() Method
Returns layout settings of the title.
Declaration
public LayoutOptions getLayout()
Returns
| Type | Description |
|---|---|
| LayoutOptions | Layout settings of the title. |
getTextProperties() Method
Returns text formatting settings for referenced or automatic title text.
Declaration
public TextProperties getTextProperties()
Returns
| Type | Description |
|---|---|
| TextProperties | Text formatting settings for referenced or automatic title text. |
getTextReference() Method
Returns a chart data reference to the title text.
Declaration
public IChartDataReference getTextReference()
Returns
| Type | Description |
|---|---|
| IChartDataReference | A reference to the title text, or |
setLayout(LayoutOptions value) Method
Sets layout settings of the title.
Declaration
public void setLayout(LayoutOptions value)
Parameters
| Name | Type | Description |
|---|---|---|
| value | LayoutOptions | Layout settings of the title. |
Remarks
Layout settings specify the position and size of the title in the chart. Refer to the LayoutOptions class description for additional information.
setTextProperties(TextProperties value) Method
Sets text formatting settings for referenced or automatic title text.
Declaration
public void setTextProperties(TextProperties value)
Parameters
| Name | Type | Description |
|---|---|---|
| value | TextProperties | Text formatting settings for referenced or automatic title text. |
Remarks
Text formatting settings apply to title text specified by a chart data reference and to automatic title text (if the title has no custom text and no text reference). To format custom title text, specify formatting settings in the TextArea object that you pass to the ChartTitleOptions.setCustomText(value) method.
setTextReference(IChartDataReference value) Method
Sets a chart data reference to the title text.
Declaration
public void setTextReference(IChartDataReference value)
Parameters
| Name | Type | Description |
|---|---|---|
| value | IChartDataReference | A reference to the title text. |
Exceptions
| Type | Description |
|---|---|
| ArgumentException | Thrown if the title is in a chart on a slide and the |
Remarks
If you pass a reference, the API clears the custom text that the ChartTitleOptions.getCustomText() method returns.