The requested page is not available for the requested platform. You are viewing the content for .NET Framework 4.5.2+ platform.
.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+
.NET Core 3.0+

ChartTitle Interface

A chart title.

Namespace: DevExpress.Spreadsheet.Charts

Assembly: DevExpress.Spreadsheet.v19.2.Core.dll

Declaration

public interface ChartTitle :
    ChartTitleOptions,
    ChartText,
    ShapeFormat,
    ShapeFormatBase,
    ShapeTextFormat
Public Interface ChartTitle
    Inherits ChartTitleOptions,
             ChartText,
             ShapeFormat,
             ShapeFormatBase,
             ShapeTextFormat
public interface ChartTitle :
    ChartTitleOptions,
    ChartText,
    ShapeFormat,
    ShapeFormatBase,
    ShapeTextFormat
Public Interface ChartTitle
    Inherits ChartTitleOptions,
             ChartText,
             ShapeFormat,
             ShapeFormatBase,
             ShapeTextFormat
public interface ChartTitle :
    ChartTitleOptions,
    ChartText,
    ShapeFormat,
    ShapeFormatBase,
    ShapeTextFormat
Public Interface ChartTitle
    Inherits ChartTitleOptions,
             ChartText,
             ShapeFormat,
             ShapeFormatBase,
             ShapeTextFormat

Remarks

The ChartTitle object is accessible using the ChartObject.Title property.

Use the SetReference method to obtain the title text from a worksheet cell or the SetValue method to specify it directly. By default, the chart title is not shown. Set the Visible property to true to display it.

The example below demonstrates how to create a clustered bar chart and add the chart title using the ChartObject.Title property, which returns the object containing the chart title options. Set the ChartTitleOptions.Visible property of this object to true to display the chart title. To explicitly specify the text for the title, utilize the ChartText.SetValue method.

Dim worksheet As Worksheet = workbook.Worksheets("chartTask2")
workbook.Worksheets.ActiveWorksheet = worksheet

' Create a chart and specify its location.
Dim chart As Chart = worksheet.Charts.Add(ChartType.BarClustered, worksheet("B4:C7"))
chart.TopLeftCell = worksheet.Cells("E3")
chart.BottomRightCell = worksheet.Cells("K14")

' Display the chart title and specify the title text.
chart.Title.Visible = True
chart.Title.SetValue("Market share Q3'13")

' Hide the chart legend.
chart.Legend.Visible = False
' Specify that each data point in the series has a different color.
chart.Views(0).VaryColors = True
See Also