Class Title
Namespace: Aspose.Cells.Charts
Assembly: Aspose.Cells.dll (25.2.0)
Encapsulates the object that represents the title of chart or axis.
public class Title : ChartTextFrame
Inheritance
object ← ChartFrame ← ChartTextFrame ← Title
Inherited Members
ChartTextFrame.m_IsAutoText, ChartTextFrame.m_deleted, ChartTextFrame.horizontal, ChartTextFrame.vertical, ChartTextFrame.rotation, ChartTextFrame.m_CharsList, ChartTextFrame.Characters(int, int), ChartTextFrame.IsAutoText, ChartTextFrame.IsDeleted, ChartTextFrame.TextHorizontalAlignment, ChartTextFrame.TextVerticalAlignment, ChartTextFrame.RotationAngle, ChartTextFrame.IsAutomaticRotation, ChartTextFrame.Text, ChartTextFrame.LinkedSource, ChartTextFrame.ReadingOrder, ChartTextFrame.DirectionType, ChartTextFrame.IsTextWrapped, ChartTextFrame.IsResizeShapeToFitText, ChartFrame.m_IsAutoXPos, ChartFrame.m_IsAutoYPos, ChartFrame.m_IsOffsetPosBeSet, ChartFrame.m_fontIndex, ChartFrame.m_AutoScaleFont, ChartFrame.m_BackgroundMode, ChartFrame.m_isAutoSize, ChartFrame.SetPositionAuto(), ChartFrame.IsInnerMode, ChartFrame.Border, ChartFrame.Area, ChartFrame.TextOptions, ChartFrame.Font, ChartFrame.AutoScaleFont, ChartFrame.BackgroundMode, ChartFrame.IsAutomaticSize, ChartFrame.X, ChartFrame.Y, ChartFrame.Height, ChartFrame.Width, ChartFrame.Shadow, ChartFrame.ShapeProperties, ChartFrame.IsDefaultPosBeSet, ChartFrame.DefaultX, ChartFrame.DefaultY, ChartFrame.DefaultWidth, ChartFrame.DefaultHeight, object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Examples
Workbook workbook = new Workbook();
Worksheet sheet = workbook.Worksheets[0];
Cells cells = sheet.Cells;
cells[0,1].PutValue("Income");
cells[1,0].PutValue("Company A");
cells[2,0].PutValue("Company B");
cells[3,0].PutValue("Company C");
cells[1,1].PutValue(10000);
cells[2,1].PutValue(20000);
cells[3,1].PutValue(30000);
int chartIndex = sheet.Charts.Add(ChartType.Column, 9, 9, 21, 15);
Chart chart = sheet.Charts[chartIndex];
//Setting the title of a chart
chart.Title.Text = "Title";
//Setting the font color of the chart title to blue
chart.Title.Font.Color = Color.Blue;
//Setting the title of category axis of the chart
chart.CategoryAxis.Title.Text = "Category";
//Setting the title of value axis of the chart
chart.ValueAxis.Title.Text = "Value";
Dim workbook as Workbook = new Workbook()
Dim sheet as Worksheet = workbook.Worksheets(0)
Dim cells as Cells = sheet.Cells
cells(0,1).PutValue("Income")
cells(1,0).PutValue("Company A")
cells(2,0).PutValue("Company B")
cells(3,0).PutValue("Company C")
cells(1,1).PutValue(10000)
cells(2,1).PutValue(20000)
cells(3,1).PutValue(30000)
Dim chartIndex as Integer = sheet.Charts.Add(ChartType.Column, 9, 9, 21, 15) ///
Dim chart as Chart = sheet.Charts(chartIndex)
'Setting the title of a chart
chart.Title.Text = "Title"
'Setting the font color of the chart title to blue
chart.Title.Font.Color = Color.Blue
'Setting the title of category axis of the chart
chart.CategoryAxis.Title.Text = "Category"
'Setting the title of value axis of the chart
chart.ValueAxis.Title.Text = "Value"
Properties
IsVisible
Represents whether the title is visible.
public bool IsVisible { get; set; }
Property Value
OverLay
Represents overlay centered title on chart without resizing chart.
public bool OverLay { get; set; }
Property Value
Text
Gets or sets the text of display unit label.
public override string Text { get; set; }
Property Value
X
Gets or sets the x coordinate of the upper left corner in units of 1/4000 of the chart area.
public override int X { get; set; }
Property Value
Y
Gets or sets the y coordinate of the upper left corner in units of 1/4000 of the chart area.
public override int Y { get; set; }
Property Value
Methods
Characters()
Gets rich text formatting of this Title.
public FontSetting[] Characters()
Returns
returns FontSetting array