GemBox.Spreadsheet
  • Overview
  • Examples
  • Free version
  • Support
  • Pricelist

    Show / Hide Table of Contents

    ChartTitle Class

    Namespace:
    GemBox.Spreadsheet.Charts
    Assembly:
    GemBox.Spreadsheet.dll

    Represents a chart or axis title.

    • C#
    • VB.NET
    public sealed class ChartTitle
    Public NotInheritable Class ChartTitle
    Inheritance:
    System.Object
    ChartTitle

    Properties

    AllowOverlap

    Gets or sets a value indicating whether title overlaps chart's plot area or resizes it.

    • C#
    • VB.NET
    public bool AllowOverlap { get; set; }
    Public Property AllowOverlap As Boolean
    Property Value
    System.Boolean

    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.

    CustomLayout

    Gets or sets the title custom layout.

    • C#
    • VB.NET
    public ChartElementLayout CustomLayout { get; set; }
    Public Property CustomLayout As ChartElementLayout
    Property Value
    ChartElementLayout

    The configuration of how the title should be positioned inside the chart.

    Direction

    Gets or sets the title text direction.

    • C#
    • VB.NET
    public ChartTitleDirection Direction { get; set; }
    Public Property Direction As ChartTitleDirection
    Property Value
    ChartTitleDirection

    The title text direction.

    DisplayText

    Gets the title display text. If IsVisible is false, then System.String.Empty is returned; otherwise, if Text is direct value, then Text value is returned; otherwise, if Text is a cell reference, then referenced cell value is returned; otherwise, default title is returned.

    • C#
    • VB.NET
    public string DisplayText { get; }
    Public ReadOnly Property DisplayText As String
    Property Value
    System.String

    The title display text.

    Fill

    Gets or sets the fill formatting options.

    • C#
    • VB.NET
    public FillFormat Fill { get; set; }
    Public Property Fill As FillFormat
    Property Value
    FillFormat

    The fill formatting options.

    IsVisible

    Gets or sets a value indicating whether title is visible.

    • C#
    • VB.NET
    public bool IsVisible { get; set; }
    Public Property IsVisible As Boolean
    Property Value
    System.Boolean

    true if title is visible; otherwise, false.

    Remarks

    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.

    Outline

    Gets or sets the outline formatting options.

    • C#
    • VB.NET
    public LineFormat Outline { get; set; }
    Public Property Outline As LineFormat
    Property Value
    LineFormat

    The outline formatting options.

    RichText

    Gets the title's rich text, which can be used to partially format the title content. Set the rich text by using SetRichText().

    • C#
    • VB.NET
    public TextBox RichText { get; }
    Public ReadOnly Property RichText As TextBox
    Property Value
    TextBox

    Text

    Gets or 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'). If set value is not null nor System.String.Empty, then IsVisible is set to true.

    • C#
    • VB.NET
    public string Text { get; set; }
    Public Property Text As String
    Property Value
    System.String

    The title text.

    TextFormat

    Gets or sets the text formatting options.

    • C#
    • VB.NET
    public TextFormat TextFormat { get; set; }
    Public Property TextFormat As TextFormat
    Property Value
    TextFormat

    The text formatting options.

    Methods

    Delete()

    Deletes the title.

    • C#
    • VB.NET
    public void Delete()
    Public Sub Delete

    SetRichText()

    Defines this chart title as rich text, enabling the usage of RichText. It is possible to use the RichText property to set multiple formats to different parts of the title.

    • C#
    • VB.NET
    public TextBox SetRichText()
    Public Function SetRichText As TextBox
    Returns
    TextBox
    Remarks

    Using this method will erase the current title.

    ToString()

    Returns the DisplayText value.

    • C#
    • VB.NET
    public override string ToString()
    Public Overrides Function ToString As String
    Returns
    System.String

    The DisplayText value.

    Overrides
    System.Object.ToString()
    Back to top

    Facebook • Twitter • LinkedIn

    © GemBox Ltd. — All rights reserved.