# ChartFrame Constructor

> Initializes a new instance of the ChartFrame class.

- **Product:** TX Text Control .NET for WPF
- **Section:** Reference
- **Kind:** Constructor
- **Introduced:** 18.0
- **Namespace:** `TXTextControl.DataVisualization`
- **Package:** `TXTextControl.TextControl.WPF.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 WPF > Reference > TXTextControl.DataVisualization > ChartFrame Constructor
- **401 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-datavisualization/chartframe/constructor/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-datavisualization/chartframe/constructor/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-datavisualization/chartframe/constructor/llms-full.txt

---

### Description

Initializes a new instance of the ChartFrame class.

### Syntax

```csharp
public ChartFrame(Component chart);
```

```vbnet
Public Sub New(chart As Component)
```

### Parameters

| Parameter | Description |
|---|---|
| chart | Specifies the chart control associated with the chart frame. It must be of the type System.Windows.Forms.DataVisualization.Charting.Chart. |

### Examples

The following example creates a Chart Frame instance and configures its export compression quality setting for a document workflow.

```csharp
TXTextControl.DataVisualization.ChartFrame chartFrame = new(new System.ComponentModel.Component());
chartFrame.ExportCompressionQuality = 90;
```

```vbnet
Dim chartFrame As New TXTextControl.DataVisualization.ChartFrame(New System.ComponentModel.Component())
chartFrame.ExportCompressionQuality = 90
```

---

## Nearby

- **Previous:** [ChartFrame.Chart Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-datavisualization/chartframe/chart-property/llms-full.txt)
- **Next:** [ChartFrame.ExportCompressionQuality Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-datavisualization/chartframe/exportcompressionquality-property/llms-full.txt)
