public final class ChartTitle extends Object implements com.gembox.spreadsheet.internal.charts.ChartObject
Modifier and Type | Method and Description |
---|---|
void |
delete()
Deletes the title.
|
ChartTitleDirection |
getDirection()
Gets the title text direction.
|
String |
getDisplayText()
Gets the title display text.
|
String |
getText()
Gets the title text as direct value (for example, 'My chart title') or as a reference to a cell with value (for example, '=Sheet1!A1').
|
boolean |
isAllowOverlap()
Gets a value indicating whether title overlaps chart's plot area or resizes it.
|
boolean |
isVisible()
Gets a value indicating whether title is visible.
|
void |
setAllowOverlap(boolean allowOverlap)
Gets a value indicating whether title overlaps chart's plot area or resizes it.
|
void |
setDirection(ChartTitleDirection direction)
Sets the title text direction.
|
void |
setText(String text)
Sets the title text as direct value (for example, 'My chart title') or as a reference to a cell with value (for example, '=Sheet1!A1').
|
void |
setVisible(boolean visible)
Sets a value indicating whether title is visible.
|
String |
toString()
Returns the
getDisplayText() value. |
public void delete()
public ChartTitleDirection getDirection()
public String getDisplayText()
isVisible
is false
, then empty string is returned;
otherwise, if getText()
is direct value, then getText()
value is returned;
otherwise, if getText()
is a cell reference, then referenced cell value is returned;
otherwise, default title is returned.public String getText()
public boolean isAllowOverlap()
true
if title overlaps chart's plot area without resizing it; otherwise, false
if title doesn't overlap chart's plot area but resizes it instead.public boolean isVisible()
Default value of this property is false
.
If title is not visible, its properties won't be saved when saving a workbook into XLSX format.
true
if title is visible; otherwise, false
.public void setAllowOverlap(boolean allowOverlap)
allowOverlap
- true
if title overlaps chart's plot area without resizing it; otherwise, false
if title doesn't overlap chart's plot area but resizes it instead.public void setDirection(ChartTitleDirection direction)
direction
- The title text direction.public void setText(String text)
null
nor empry string, then setVisible(boolean)
is set to true
.text
- The title text.public void setVisible(boolean visible)
Default value of this property is false
.
If title is not visible, its properties won't be saved when saving a workbook into XLSX format.
visible
- true
if title is visible; otherwise, false
.public String toString()
getDisplayText()
value.toString
in class Object
getDisplayText()
value.© GemBox d.o.o. — All rights reserved.