# Chart Class

> Chart class in the TX Sheet Control .NET API: Worksheet-scoped server API contract; requests retain document identity and cancellation semantics.

- **Product:** TX Sheet Control
- **Section:** Documentation
- **Kind:** Class
- **Namespace:** `TXTextControl.TXSheetControl.Server`
- **Package:** `TXTextControl.TXSheetControl.Server` (assembly `TXTextControl.TXSheetControl.Api.dll`, from the private NuGet feed or the supplied NuGet folder)
- **Package:** `TXTextControl.TXSheetControl.Blazor` (assembly `TXTextControl.TXSheetControl.Api.dll`, from the private NuGet feed or the supplied NuGet folder)
- **Inherits:** `TXTextControl.TXSheetControl.Server.DocumentObject`
- **Path:** TX Sheet Control > API Reference > .NET API > TXTextControl.TXSheetControl.Server > Chart Class
- **994 words**
- **Web URL:** https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/chart/
- **LLMs URL:** https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/chart/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/chart/llms-full.txt

---

Worksheet-scoped server API contract; requests retain document identity and cancellation semantics.

### Syntax

```csharp
public class Chart
```

### Members

#### Properties

| Property | Description |
|---|---|
| [Id](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/chart/id-property/llms-full.txt) |  |

#### Methods

| Method | Description |
|---|---|
| [GetDataAsync](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/chart/getdataasync-method/llms-full.txt) | Performs an operation on this document without activating another worksheet. |
| [GetSnapshotAsync](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/chart/getsnapshotasync-method/llms-full.txt) | Performs an operation on this document without activating another worksheet. |
| [GetTitleAsync](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/chart/gettitleasync-method/llms-full.txt) | Performs an operation on this document without activating another worksheet. |
| [MoveToAsync](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/chart/movetoasync-method/llms-full.txt) | Performs an operation on this document without activating another worksheet. |
| [RemoveAsync](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/chart/removeasync-method/llms-full.txt) | Performs an operation on this document without activating another worksheet. |
| [ResizeAsync](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/chart/resizeasync-method/llms-full.txt) | Performs an operation on this document without activating another worksheet. |
| [UpdateAsync](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/chart/updateasync-method/llms-full.txt) | Performs an operation on this document without activating another worksheet. |

### Examples

Build a small report using this document API and return its PDF bytes. Pass a live control with a fresh workbook; the caller owns its lifetime.

```csharp
using TXTextControl.TXSheetControl.Server;

async Task<byte[]> CreateChartReportAsync(ServerSheetControl control)
{
    var book = control.Workbook;
    var sheet = await book.Sheets.AtAsync(0);
    await sheet.Range("A1:B5").SetValuesAsync(new object?[][]
    {
        ["Region", "Revenue"], ["North", 42000], ["South", 38500], ["East", 31200], ["West", 44900]
    });

    var chart = await sheet.Charts.AddAsync(new { type = "column", title = "Revenue by region", dataRange = "A1:B5", anchor = new { cell = "D2" } });
    return await control.SaveAsync(StreamType.PDF);
}
```

### See Also

- [TXTextControl.TXSheetControl.Server Namespace](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/llms-full.txt)
- [Charts and Sparklines](https://docs.textcontrol.com/tx-sheet-control/spreadsheets/charts/llms-full.txt)

---

## In This Section

- [Chart.GetDataAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/chart/getdataasync-method/llms-full.txt): Chart.GetDataAsync method in the TX Sheet Control .NET API: Performs an operation on this document without activating another worksheet.
- [Chart.GetSnapshotAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/chart/getsnapshotasync-method/llms-full.txt): Chart.GetSnapshotAsync method in the TX Sheet Control .NET API: Performs an operation on this document without activating another worksheet.
- [Chart.GetTitleAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/chart/gettitleasync-method/llms-full.txt): Chart.GetTitleAsync method in the TX Sheet Control .NET API: Performs an operation on this document without activating another worksheet.
- [Chart.Id Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/chart/id-property/llms-full.txt): Chart.Id property in the TX Sheet Control .NET API, with its syntax, its type string, a C# example and remarks on awaiting tasks and handles.
- [Chart.MoveToAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/chart/movetoasync-method/llms-full.txt): Chart.MoveToAsync method in the TX Sheet Control .NET API: Performs an operation on this document without activating another worksheet.
- [Chart.RemoveAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/chart/removeasync-method/llms-full.txt): Chart.RemoveAsync method in the TX Sheet Control .NET API: Performs an operation on this document without activating another worksheet.
- [Chart.ResizeAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/chart/resizeasync-method/llms-full.txt): Chart.ResizeAsync method in the TX Sheet Control .NET API: Performs an operation on this document without activating another worksheet.
- [Chart.UpdateAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/chart/updateasync-method/llms-full.txt): Chart.UpdateAsync method in the TX Sheet Control .NET API: Performs an operation on this document without activating another worksheet.

---

## Nearby

- **Previous:** [CellTypes.RemoveRendererAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/celltypes/removerendererasync-method/llms-full.txt)
- **Next:** [Chart.GetDataAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/chart/getdataasync-method/llms-full.txt)
