ChartTitleOptions.Visible Property
Gets or sets a value indicating whether the specific title is displayed on a chart.
Namespace: DevExpress.Spreadsheet.Charts
Assembly: DevExpress.Spreadsheet.v19.2.Core.dll
Declaration
Property Value
Type | Description |
---|---|
Boolean | true, to add the title to the chart; otherwise, false. |
Property Paths
You can access this nested property as listed below:
Object Type | Path to Visible |
---|---|
Axis |
|
Remarks
Use the Visible property to display or hide the chart (ChartObject.Title) or axis (Axis.Title) title.
Example
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.
Note
A complete sample project is available at https://github.com/DevExpress-Examples/winforms-spreadsheet-chart-api-e5222
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
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the Visible property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.