Class Title

Class Title

Namespace: Aspose.Cells.Charts
Assembly: Aspose.Cells.dll (25.2.0)

Encapsule l’objet qui représente le titre d’un graphique ou d’un axe.

public class Title : ChartTextFrame

Héritage

objectChartFrameChartTextFrameTitle

Membres hérités

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()

Exemples

Workbook workbook = new Workbook();
Worksheet sheet = workbook.Worksheets[0];

Cells cells = sheet.Cells;
cells[0,1].PutValue("Revenu");
cells[1,0].PutValue("Société A");
cells[2,0].PutValue("Société B");
cells[3,0].PutValue("Société 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];

//Définir le titre d'un graphique
chart.Title.Text = "Titre";
//Définir la couleur de la police du titre du graphique en bleu
chart.Title.Font.Color = Color.Blue;
//Définir le titre de l'axe des catégories du graphique
chart.CategoryAxis.Title.Text = "Catégorie";
//Définir le titre de l'axe des valeurs du graphique
chart.ValueAxis.Title.Text = "Valeur";
Dim workbook as Workbook = new Workbook()
Dim sheet as Worksheet = workbook.Worksheets(0)

Dim cells as Cells = sheet.Cells
cells(0,1).PutValue("Revenu")
cells(1,0).PutValue("Société A")
cells(2,0).PutValue("Société B")
cells(3,0).PutValue("Société 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)

'Définir le titre d'un graphique
chart.Title.Text = "Titre"
'Définir la couleur de la police du titre du graphique en bleu
chart.Title.Font.Color = Color.Blue
'Définir le titre de l'axe des catégories du graphique
chart.CategoryAxis.Title.Text = "Catégorie"
'Définir le titre de l'axe des valeurs du graphique
chart.ValueAxis.Title.Text = "Valeur"

Propriétés

IsVisible

Représente si le titre est visible.

public bool IsVisible { get; set; }

Valeur de la propriété

bool

OverLay

Représente un titre superposé centré sur le graphique sans redimensionner le graphique.

public bool OverLay { get; set; }

Valeur de la propriété

bool

Text

Obtient ou définit le texte de l’étiquette d’unité d’affichage.

public override string Text { get; set; }

Valeur de la propriété

string

X

Obtient ou définit la coordonnée x du coin supérieur gauche en unités de 1/4000 de la zone du graphique.

public override int X { get; set; }

Valeur de la propriété

int

Y

Obtient ou définit la coordonnée y du coin supérieur gauche en unités de 1/4000 de la zone du graphique.

public override int Y { get; set; }

Valeur de la propriété

int

Méthodes

Characters()

Obtient le formatage de texte enrichi de ce titre.

public FontSetting[] Characters()

Renvoie

FontSetting[]

renvoie un tableau de FontSetting

 Français