public class Title extends ChartTextFrame
Example
Workbook workbook = new Workbook();
Worksheet sheet = workbook.getWorksheets().get(0);
Cells cells = sheet.getCells();
cells.get(0,1).putValue("Income");
cells.get(1,0).putValue("Company A");
cells.get(2,0).putValue("Company B");
cells.get(3,0).putValue("Company C");
cells.get(1,1).putValue(10000);
cells.get(2,1).putValue(20000);
cells.get(3,1).putValue(30000);
int chartIndex = sheet.getCharts().add(ChartType.COLUMN, 9, 9, 21, 15);
Chart chart = sheet.getCharts().get(chartIndex);
//Setting the title of a chart
chart.getTitle().setText("Title");
//Setting the font color of the chart title to blue
chart.getTitle().getFont().setColor(Color.getBlue());
//Setting the title of category axis of the chart
chart.getCategoryAxis().getTitle().setText("Category");
//Setting the title of value axis of the chart
chart.getValueAxis().getTitle().setText("Value");
| Modifier and Type | Method and Description |
|---|---|
FontSetting[] |
characters()
Gets rich text formatting of this Title.
|
FontSetting[] |
getCharacters()
Deprecated.
Use Title.Characters() method instead.
|
boolean |
getOverLay()
Represents overlay centered title on chart without resizing chart.
|
java.lang.String |
getText()
Gets the text of display unit label.
|
int |
getX()
Gets the x coordinate of the upper left corner in units of 1/4000 of the chart area.
|
int |
getY()
Gets the y coordinate of the upper left corner in units of 1/4000 of the chart area.
|
boolean |
isVisible()
Represents whether the title is visible.
|
void |
setOverLay(boolean value)
Represents overlay centered title on chart without resizing chart.
|
void |
setText(java.lang.String value)
Sets the text of display unit label.
|
void |
setVisible(boolean value)
Represents whether the title is visible.
|
void |
setX(int value)
Sets the x coordinate of the upper left corner in units of 1/4000 of the chart area.
|
void |
setY(int value)
Sets the y coordinate of the upper left corner in units of 1/4000 of the chart area.
|
characters, getDirectionType, getLinkedSource, getReadingOrder, getRotationAngle, getTextDirection, getTextHorizontalAlignment, getTextVerticalAlignment, isAutomaticRotation, isAutoText, isDeleted, isResizeShapeToFitText, isTextWrapped, setAutoText, setDeleted, setDirectionType, setLinkedSource, setReadingOrder, setResizeShapeToFitText, setRotationAngle, setTextDirection, setTextHorizontalAlignment, setTextVerticalAlignment, setTextWrappedgetArea, getAutoScaleFont, getBackground, getBackgroundMode, getBorder, getChart, getDefaultHeight, getDefaultWidth, getDefaultX, getDefaultY, getFont, getHeight, getShadow, getShapeProperties, getTextFont, getTextOptions, getWidth, isAutomaticSize, isDefaultPosBeSet, isInnerMode, setAutomaticSize, setAutoScaleFont, setBackground, setBackgroundMode, setHeight, setInnerMode, setPositionAuto, setShadow, setWidthpublic java.lang.String getText()
getText in class ChartTextFramepublic void setText(java.lang.String value)
setText in class ChartTextFramepublic boolean isVisible()
public void setVisible(boolean value)
public int getX()
getX in class ChartFramepublic void setX(int value)
setX in class ChartFramepublic int getY()
getY in class ChartFramepublic void setY(int value)
setY in class ChartFramepublic boolean getOverLay()
public void setOverLay(boolean value)
public FontSetting[] getCharacters()
Remarks
NOTE: This member is now obsolete. Instead, please use Title.Characters() method. This property will be removed 12 months later since November 2016. Aspose apologizes for any inconvenience you may have experienced.public FontSetting[] characters()
See Also:
Aspose.Cells Documentation - the home page for the Aspose.Cells Product Documentation.
Aspose.Cells Support Forum - our preferred method of support.
We guarantee a prompt response to any inquiry!
© Aspose Pty Ltd 2001-2023. All Rights Reserved.