Chart Title

Spread.Services Documentation
Chart Title
Collapse All Expand All

Spread.Services Documentation > Developer's Guide > Manage Data in Spread Component > Use Chart > Configure Chart > Chart Title

In Spread.Services, you can use the properties of the IChart Interface to set up the chart title as per your choice. When working with chart title, you can perform the following tasks:

- Set formula for chart title
- Set format for chart title and font style

### Set formula for chart title

Refer to the following example code to set formula for chart title.

C# | Copy Code
--- | ---

    //Set formula for chart title.
    shape.Chart.HasTitle = true;
    shape.Chart.ChartTitle.Formula = "=Sheet1!$E$1";
    worksheet.Range["E1"].Value = "Sample Chart";

### Set format for chart title and font style

Refer to the following example code to set format for chart title and font style.

C# | Copy Code
--- | ---

    //Set chart title's format and font style.
    shape.Chart.HasTitle = true;
    //shape.Chart.ChartTitle.Text = "aaaaa";
    shape.Chart.ChartTitle.Font.Bold = true;
    shape.Chart.ChartTitle.Format.Fill.Color.RGB = Color.Red;
    shape.Chart.ChartTitle.Format.Line.Color.RGB = Color.Blue;

Copyright © GrapeCity, inc. All rights reserved.