ChartTitle Class
Contains settings for a standard chart title.
Declaration
public class ChartTitle extends ChartTitleOptions
Remarks
Call the Chart.getTitle() method to access the title of a chart. To add a title to a chart, pass a ChartTitle object to the Chart.setTitle(value) method. To remove the chart title, call the Chart.setTitle(null) method.
A chart title displays custom text (ChartTitle.getCustomText()) or text from a chart data reference (ChartTitle.getTextReference()). If the title has no custom text and no text reference, the chart displays automatic title text.
Axis titles in standard charts use the ChartTitleOptions class.
Refer to the following help topic for additional information: Create and Customize Charts — Presentation API for Java.
Inherited Members
Inheritance
Constructors
ChartTitle(IChartDataReference reference, TextProperties textProperties) Constructor
Initializes a new instance of the ChartTitle class with the specified text reference and text formatting settings.
Declaration
public ChartTitle(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. |
ChartTitle(IChartDataReference reference) Constructor
Initializes a new instance of the ChartTitle class with the specified text reference.
Declaration
public ChartTitle(IChartDataReference reference)
Parameters
| Name | Type | Description |
|---|---|---|
| reference | IChartDataReference | A chart data reference to the title text. |
ChartTitle(TextArea textArea) Constructor
Initializes a new instance of the ChartTitle class with the specified custom text.
Declaration
public ChartTitle(TextArea textArea)
Parameters
| Name | Type | Description |
|---|---|---|
| textArea | TextArea | Custom title text. |
Methods
deepClone() Method
Returns a deep copy of this ChartTitle instance.
Declaration
public ChartTitle deepClone()
Returns
| Type | Description |
|---|---|
ChartTitle |
A deep copy of this |
getAllowOverlapChart() Method
Returns whether the title can overlap the plot area.
Declaration
public boolean getAllowOverlapChart()
Returns
| Type | Description |
|---|---|
| boolean |
|
setAllowOverlapChart(boolean value) Method
Sets whether the title can overlap the plot area.
Declaration
public void setAllowOverlapChart(boolean value)
Parameters
| Name | Type | Description |
|---|---|---|
| value | boolean |
|
Remarks
If you create a title and do not call the setAllowOverlapChart(value) method, the API uses false. For a title in a loaded document, the API reads the value from the document.