# ChartDataRelationDialog Class

> The ChartDataRelationDialog class allows the user to prepare a ChartFrame object to display data from a data relation defined in a mail merge data source. The dialog lets the user select the parent and child tables which form the data relation and two data columns in the child table which are used as the x-axis label text and the actual data. The chart is manipulated by this dialog as follows: First, all existing chart areas except one are removed. Then all existing "series" except one which belongs to that chart area are removed. Afterwards the ChartFrame object is named after the child table in the selected data relation so data can be assigned properly during the mail merge process. Then the remaining chart area is named after the child table column containing the axis label text and the series inside that chart area is named after the child table column containing the actual data. The ChartDataRelationDialog is a modal dialog box which must be shown with the EditDataRelationsDialog.ShowDialog method.

- **Product:** TX Text Control .NET for Windows Forms
- **Section:** Reference
- **Kind:** Class
- **Introduced:** 25.0
- **Namespace:** `TXTextControl.DocumentServer.Windows.Forms`
- **Package:** `TXTextControl.TextControl.WinForms.SDK` (assembly `TXDocumentServer.Windows.Forms.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXDocumentServer.Windows.Forms.dll` from the setup
- **Inherits:** `System.Windows.Forms.Form` › `TXTextControl.DocumentServer.Windows.Forms.HighDpiForm`
- **Path:** TX Text Control .NET for Windows Forms > Reference > TXTextControl.DocumentServer.Windows.Forms > ChartDataRelationDialog Class
- **867 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-documentserver-windows-forms/chartdatarelationdialog/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-documentserver-windows-forms/chartdatarelationdialog/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-documentserver-windows-forms/chartdatarelationdialog/llms-full.txt

---

### Description

The ChartDataRelationDialog class allows the user to prepare a [ChartFrame](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-datavisualization/chartframe/llms-full.txt) object to display data from a data relation defined in a mail merge data source. The dialog lets the user select the parent and child tables which form the data relation and two data columns in the child table which are used as the x-axis label text and the actual data. The chart is manipulated by this dialog as follows: First, all existing chart areas except one are removed. Then all existing "series" except one which belongs to that chart area are removed. Afterwards the ChartFrame object is named after the child table in the selected data relation so data can be assigned properly during the mail merge process. Then the remaining chart area is named after the child table column containing the axis label text and the series inside that chart area is named after the child table column containing the actual data. The ChartDataRelationDialog is a modal dialog box which must be shown with the `EditDataRelationsDialog.ShowDialog` method.

### Syntax

```csharp
public class ChartDataRelationDialog : HighDpiForm
```

```vbnet
Public Class ChartDataRelationDialog
    Inherits HighDpiForm
```

### Examples

The following example creates a Chart Data Relation Dialog instance and configures its allow transparency setting for a document workflow.

```csharp
using TXTextControl.DocumentServer.Windows.Forms.ChartDataRelationDialog chartDataRelationDialog = new(new TXTextControl.DataVisualization.ChartFrame(new System.ComponentModel.Component()), new TXTextControl.DocumentServer.DataSources.DataSourceManager());
chartDataRelationDialog.AllowTransparency = true;
```

```vbnet
Dim chartDataRelationDialog As New TXTextControl.DocumentServer.Windows.Forms.ChartDataRelationDialog(New TXTextControl.DataVisualization.ChartFrame(New System.ComponentModel.Component()), New TXTextControl.DocumentServer.DataSources.DataSourceManager())
chartDataRelationDialog.AllowTransparency = True
```

---

## In This Section

- [ChartDataRelationDialog Constructor](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-documentserver-windows-forms/chartdatarelationdialog/constructor/llms-full.txt): Creates a ChartDataRelationDialog object for the specified DocumentServer.DataSources.DataSourceManager.

---

## Nearby

- **Previous:** [TXTextControl.DocumentServer.Windows.Forms namespace](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-documentserver-windows-forms/llms-full.txt)
- **Next:** [ChartDataRelationDialog Constructor](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-documentserver-windows-forms/chartdatarelationdialog/constructor/llms-full.txt)
