ChartTitle Interface
A chart title.
Namespace: DevExpress.Spreadsheet.Charts
Assembly: DevExpress.Spreadsheet.v24.1.Core.dll
NuGet Package: DevExpress.Spreadsheet.Core
Declaration
public interface ChartTitle :
ChartTitleOptions,
ChartText,
ShapeFormat,
ShapeFormatBase,
ShapeTextFormat
Related API Members
The following members return ChartTitle objects:
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.
Example
Worksheet worksheet = workbook.Worksheets["chartTask2"];
workbook.Worksheets.ActiveWorksheet = worksheet;
// Create a chart and specify its location.
Chart 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