# Chart Title

This topic contains information on how to configure or customize the title of charts in Spread for WPF.

## Content

Titles are the text fields that appear on a chart. It provides a descriptive heading for the chart data. You can add the title text to a chart by using the [Text](/spreadnet/api/latest/online-wpf/GrapeCity.Spreadsheet/GrapeCity.Spreadsheet.Charts.IChartTitle.Text.html) property of the [IChartTitle ](/spreadnet/api/latest/online-wpf/GrapeCity.Spreadsheet/GrapeCity.Spreadsheet.Charts.IChartTitle.html)interface. You can also adjust alignment, position, height, width, etc. using the various customization options available.
![](https://cdn.mescius.io/document-site-files/images/0f63724f-fddf-4351-8c24-0b4338c0fda9/images/charttitle.png)
The following example code assigns a title "Sales Record" to the chart and includes it in the layout.
**C#**

```csharp
spreadSheet1.Workbook.ActiveSheet.Cells[0, 1].Value = "Q1";
spreadSheet1.Workbook.ActiveSheet.Cells[0, 2].Value = "Q2";
spreadSheet1.Workbook.ActiveSheet.Cells[0, 3].Value = "Q3";
spreadSheet1.Workbook.ActiveSheet.Cells[1, 0].Value = "Mobile Phones";
spreadSheet1.Workbook.ActiveSheet.Cells[2, 0].Value = "Laptops";
spreadSheet1.Workbook.ActiveSheet.Cells[3, 0].Value = "Tablets";
for (var r = 1; r <= 3; r++)
{
    for (var c = 1; c <= 3; c++)
    {
        Random random = new Random();
        spreadSheet1.Workbook.ActiveSheet.Cells[r, c].Value = 0 + random.Next(0, 100);
    }
}
spreadSheet1.Workbook.ActiveSheet.Cells["A1:D4"].Select();
spreadSheet1.Workbook.ActiveSheet.Shapes.AddChart(GrapeCity.Spreadsheet.Charts.ChartType.ColumnClustered, 100, 150, 400, 300, true);
spreadSheet1.Workbook.ActiveSheet.ChartObjects[0].Chart.ChartTitle.Text = "Sales Report";
spreadSheet1.Workbook.ActiveSheet.ChartObjects[0].Chart.ChartTitle.Left = 10;
spreadSheet1.Workbook.ActiveSheet.ChartObjects[0].Chart.ChartTitle.IncludeInLayout = true;
```

**VB**

```vbnet
spreadSheet1.Workbook.ActiveSheet.Cells(0, 1).Value = "Q1"
spreadSheet1.Workbook.ActiveSheet.Cells(0, 2).Value = "Q2"
spreadSheet1.Workbook.ActiveSheet.Cells(0, 3).Value = "Q3"
spreadSheet1.Workbook.ActiveSheet.Cells(1, 0).Value = "Mobile Phones"
spreadSheet1.Workbook.ActiveSheet.Cells(2, 0).Value = "Laptops"
spreadSheet1.Workbook.ActiveSheet.Cells(3, 0).Value = "Tablets"
For r = 1 To 3
        For c = 1 To 3
            Dim random As Random = New Random()
            spreadSheet1.Workbook.ActiveSheet.Cells(r, c).Value = 0 + random.Next(0, 100)
        Next
Next
spreadSheet1.Workbook.ActiveSheet.Cells("A1:D4").Select()
spreadSheet1.Workbook.ActiveSheet.Shapes.AddChart(GrapeCity.Spreadsheet.Charts.ChartType.ColumnClustered, 100, 150, 400, 300, True)
spreadSheet1.Workbook.ActiveSheet.ChartObjects(0).Chart.ChartTitle.Text = "Sales Report"
spreadSheet1.Workbook.ActiveSheet.ChartObjects(0).Chart.ChartTitle.Left = 10
spreadSheet1.Workbook.ActiveSheet.ChartObjects(0).Chart.ChartTitle.IncludeInLayout = True
```

By default, the title is displayed on a chart. If not, use the [ShowTitle()](/spreadnet/api/latest/online-wpf/GrapeCity.Spreadsheet/GrapeCity.Spreadsheet.Charts.IChart.ShowTitle.html) method on the chart object which ensures that the title of the chart is visible to the users.
Using the [Formula](/spreadnet/api/latest/online-wpf/GrapeCity.Spreadsheet/GrapeCity.Spreadsheet.Charts.IChartTitle.Formula.html) property of the **IChartTitle** interface, you can also bind data from the worksheet to chart title. It links the title to a specific cell in the worksheet and when you make any changes to the cell, it will automatically reflect in the chart title. Note that users can use the **Formula** property to bind data to series values and categories as well.
Refer to the following example code to set the chart title to the value of cell A1 in Sheet1.
**C#**

```csharp
spreadSheet1.Workbook.ActiveSheet.ChartObjects[0].Chart.ShowTitle();
spreadSheet1.Workbook.ActiveSheet.ChartObjects[0].Chart.ChartTitle.Formula = "Sheet1!A1";
```

**VB**

```vbnet
spreadSheet1.Workbook.ActiveSheet.ChartObjects(0).Chart.ShowTitle()
spreadSheet1.Workbook.ActiveSheet.ChartObjects(0).Chart.ChartTitle.Formula = "Sheet1!A1"
```