New to Telerik Document ProcessingStart a free 30-day trial

Title and Legend

Updated on Jun 16, 2026

You can manipulate the legend and the title of a chart.

Title

You can access and set the Title property of the DocumentChart object, which is of type Title. The Title property is exposed in both the DocumentChart and SeriesBase classes. Similar to the series of the chart, the title can be a simple string value or a reference to data. The reference is not to a CellIndex, but to a CellRange. If the CellRange contains more than one cell, the values of the cells are concatenated.

Example 1: Setting the Title of a Chart to a String

C#
FloatingChartShape chartShape = new FloatingChartShape(worksheet, new CellIndex(0, 4), new CellRange(1, 1, 5, 2), ChartType.Pie)
			{
				Width = 460,
				Height = 250
			};
			DocumentChart chart = chartShape.Chart;

			chart.Title = new TextTitle("Text title");

Example 2: Setting the Title of a Series to a CellRange

C#
BarSeriesGroup columnGroup = chart.SeriesGroups.First() as BarSeriesGroup;
SeriesBase firstSeries = columnGroup.Series.First();

firstSeries.Title = new FormulaTitle(new WorkbookFormulaChartData(worksheet, new CellRange(0, 0, 0, 1)));

Figure 1: Chart Title

Chart title example

Legend

The charts use a legend to help users understand the data plotted on the chart.

You can add or edit the legend of the chart through the Legend property of the DocumentChart object. The property is of type Legend. The Legend type contains one property: LegendPosition of type LegendPosition, which is an enumeration with four members: Top, Bottom, Left, and Right. The actual entries of the legend are constructed by the titles of the series.

Example 3: Adding a Chart Legend

C#
chart.Legend = new Legend();
chart.Legend.Position = LegendPosition.Left;

Figure 2: Chart Legend

Chart legend example

In this article
TitleLegend
Not finding the help you need?
Contact Support