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+

Axis.Title Property

Provides access to options used to display and format the axis title.

Namespace: DevExpress.Spreadsheet.Charts

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

Declaration

ChartTitleOptions Title { get; }
ReadOnly Property Title As ChartTitleOptions
ChartTitleOptions Title { get; }
ReadOnly Property Title As ChartTitleOptions

Property Value

Type Description
ChartTitleOptions

A ChartTitleOptions object containing display settings for titles on a chart.

Property Value

Type Description
ChartTitleOptions

A ChartTitleOptions object containing display settings for titles on a chart.

Remarks

Use the Title property to access an object exposing the ChartTitleOptions interface, which inherits the ChartText and ShapeFormatBase interfaces. Use this object's members to display or hide the axis title (by setting the ChartTitleOptions.Visible property), to specify the text for the title (by using the ChartText.SetValue or ChartText.SetReference method), to adjust the position of the title (via the ChartTitleOptions.Layout property) and modify the title appearance (by utilizing the ShapeFormatBase.Fill and ShapeFormatBase.Outline properties).

Examples

The following example demonstrates how to create a clustered bar chart and add the title to the value axis using the Axis.Title property, which returns the ChartTitleOptions object containing basic title options. Set the ChartTitleOptions.Visible property to true to display the axis 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")

' Specify the axis title text.
chart.PrimaryAxes(1).Title.Visible = True
chart.PrimaryAxes(1).Title.SetValue("Shipment in millions of units")
' Hide the legend.
chart.Legend.Visible = False
' Specify that each data point in the series has a different color.
chart.Views(0).VaryColors = True
See Also