# ChartCollection.Remove Method

> Removes a chart from a Text Control document.

- **Product:** TX Text Control .NET for Windows Forms
- **Section:** Reference
- **Kind:** Method
- **Introduced:** 18.0
- **Namespace:** `TXTextControl.DataVisualization`
- **Package:** `TXTextControl.TextControl.WinForms.SDK` (assembly `TXTextControl.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXTextControl.dll` from the setup
- **Path:** TX Text Control .NET for Windows Forms > Reference > TXTextControl.DataVisualization > ChartCollection.Remove Method
- **454 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-datavisualization/chartcollection/remove-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-datavisualization/chartcollection/remove-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-datavisualization/chartcollection/remove-method/llms-full.txt

---

### Description

Removes a chart from a Text Control document.

### Syntax

```csharp
public bool Remove(ChartFrame chartFrame);
```

```vbnet
Public Function Remove(chartFrame As ChartFrame) As Boolean
```

### Parameters

| Parameter | Description |
|---|---|
| chartFrame | Specifies the chart to remove. |

### Return Value

The return value is true, if the chart could be removed. Otherwise, it is false.

### Examples

The following example removes an item from the chart collection.

```csharp
if (chartCollection.Remove(new TXTextControl.DataVisualization.ChartFrame(new System.ComponentModel.Component())))
{
    Console.WriteLine("Remove completed successfully.");
}
```

```vbnet
If chartCollection.Remove(New TXTextControl.DataVisualization.ChartFrame(New System.ComponentModel.Component())) Then
    Console.WriteLine("Remove completed successfully.")
End If
```

---

## Nearby

- **Previous:** [ChartCollection.GetItem Method](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-datavisualization/chartcollection/getitem-method/llms-full.txt)
- **Next:** [ChartEventArgs Class](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-datavisualization/charteventargs/llms-full.txt)
