Skip to main content
A newer version of this page is available. .

ChartObject.Title Property

Gets the title of the chart.

Namespace: DevExpress.Spreadsheet.Charts

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

Declaration

ChartTitle Title { get; }

Property Value

Type Description
ChartTitle

A ChartTitle object that is the chart title.

Remarks

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