# Using Charts with TX Text Control .NET for Windows 31.0 in .NET 6

> The chart controls included in the .NET Framework are deprecated and were not ported to .NET (Core). This article shows how to use a .NET 6 version of the DataVisualization control with TX Text Control .NET for Windows Forms (and ASP.NET).

- **Author:** Bjoern Meyer
- **Published:** 2022-11-02
- **Modified:** 2026-07-17
- **Description:** The chart controls included in the .NET Framework are deprecated and were not ported to .NET (Core). This article shows how to use a .NET 6 version of the DataVisualization control with TX Text Control .NET for Windows Forms (and ASP.NET).
- **3 min read** (460 words)
- **Tags:**
  - Windows Forms
  - Charts
  - .NET 6
- **Web URL:** https://www.textcontrol.com/blog/2022/11/02/using-charts-with-tx-text-control-net-for-windows-3100-in-net-6/
- **LLMs URL:** https://www.textcontrol.com/blog/2022/11/02/using-charts-with-tx-text-control-net-for-windows-3100-in-net-6/llms.txt
- **LLMs-Full URL:** https://www.textcontrol.com/blog/2022/11/02/using-charts-with-tx-text-control-net-for-windows-3100-in-net-6/llms-full.txt

---

For .NET Framework 2.0 and later, Microsoft licensed the Dundas charting controls to bring charting support to .NET Windows Forms (and ASP.NET). The namespace *System.Windows.Forms.DataVisualization* is now officially deprecated, but the .NET team at Microsoft kept the door slightly open by [publishing the sources on GitHub](https://github.com/dotnet/winforms-datavisualization) to enable charting features for WinForms applications that are developed on .NET Core 3 and better.

### .NET Compatible Fork

Based on this repository, there are multiple forks including this fork that added .NET 6 support:

<https://github.com/kirsan31/winforms-datavisualization>

If you clone this repository, build the *System.Windows.Forms.DataVisualization.dll* and reference it in your project, you can directly use these charts within a .NET 6 Windows Forms application:

```
// create a new chart control
Chart chart = new Chart();

// add a chart area
chart.ChartAreas.Add("chartArea1");

chart.Series.Add("series1");
chart.Series["series1"].ChartArea = "chartArea1";
chart.Series["series1"].ChartType = SeriesChartType.Bar;

// connect to a data source
DataSet ds = new DataSet();
ds.ReadXml("data.xml");

chart.Series[0].XValueMember = ds.Tables[0].Columns[0].ColumnName;
chart.Series[0].YValueMembers = ds.Tables[0].Columns[1].ColumnName;

chart.DataSource = ds.Tables[0];
chart.DataBind();

// create a chart frame
TXTextControl.DataVisualization.ChartFrame frame =
  new TXTextControl.DataVisualization.ChartFrame(chart);

frame.Name = "points";

// add chart to the document
textControl1.Charts.Add(frame, -1);
```

The following XML is used as the sample data source:

```
<?xml version="1.0" encoding="utf-8" ?>
<sales>
  <points>
    <country>Country 1</country>
    <value>100</value>
  </points>
  <points>
    <country>Country 2</country>
    <value>120</value>
  </points>
  <points>
    <country>Country 3</country>
    <value>80</value>
  </points>
</sales>
```

The result can be seen in the following screenshot:

![Charts in TX Text Control](https://s1-www.textcontrol.com/assets/dist/blog/2022/11/02/a/assets/chart1.webp "Charts in TX Text Control")

### TX Text Control Fork

We forked this repository to make it compatible to TX Text Control .NET for Windows Forms. If you want to use the out-of-the-box ribbon tabs to insert and format added chart objects, you can clone our fork of the repository.

<https://github.com/TextControl/winforms-datavisualization>

In order to integrate this version, the following steps must be followed.

1. Clone the repository and open it in Visual Studio.  
    <https://github.com/TextControl/winforms-datavisualization>
2. Find the created NuGet package **System.Windows.Forms.DataVisualization.1.0.0.nupkg** in the *Release* or *Debug* folder and copy that into the *Text Control Offline Packages* folder:  
    *C:\\Program Files (x86)\\Text Control GmbH\\NuGetPackages*
3. In your Windows Forms application, select the project in the *Solution Explorer* and click *Project -> Manage NuGet Packages...* from the main menu.
4. Select *Text Control Offline Packages* as the *Package source* and click *Browse*.
5. Select *System.Windows.Forms.DataVisualization* and click *Install*.

When using the *RibbonInsertTab* and *RibbonChartLayoutTab* in your application, the added charting control is recognized automatically and the charting functionality is enabled.

![Charts in TX Text Control](https://s1-www.textcontrol.com/assets/dist/blog/2022/11/02/a/assets/chart2.webp "Charts in TX Text Control")

![Charts in TX Text Control](https://s1-www.textcontrol.com/assets/dist/blog/2022/11/02/a/assets/chart3.webp "Charts in TX Text Control")

---

## About Bjoern Meyer

As CEO, Bjoern is the visionary behind our strategic direction and business development, bridging the gap between our customers and engineering teams. His deep passion for coding and web technologies drives the creation of innovative products. If you're at a tech conference, be sure to stop by our booth - you'll most likely meet Bjoern in person. With an advanced graduate degree (Dipl. Inf.) in Computer Science, specializing in AI, from the University of Bremen, Bjoern brings significant expertise to his role. In his spare time, Bjoern enjoys running, paragliding, mountain biking, and playing the piano.

- [LinkedIn](https://www.linkedin.com/in/bjoernmeyer/)
- [X](https://x.com/txbjoern)
- [GitHub](https://github.com/bjoerntx)

---

## Related Posts

- [Upgrading a .NET Framework Windows Forms App to a .NET 8 Windows Forms App with TX Text Control 32.0 SP2](https://www.textcontrol.com/blog/2024/01/16/upgrading-a-net-framework-windows-forms-app-to-a-net-6-windows-forms-app-with-tx-text-control-32-0-sp2/llms.txt)
- [Upgrading a .NET Framework Windows Forms App to a .NET 6 Windows Forms App](https://www.textcontrol.com/blog/2023/07/19/upgrading-a-net-framework-windows-forms-app-to-a-net-6-windows-forms-app/llms.txt)
- [Official TX Text Control .NET Sample Applications Are Now Hosted on GitHub](https://www.textcontrol.com/blog/2023/01/08/official-tx-text-control-net-sample-applications-are-now-hosted-on-github/llms.txt)
- [Getting Started with Windows Forms (.NET 5 and better)](https://www.textcontrol.com/blog/2022/09/01/getting-started-with-windows-forms-net-5-and-better/llms.txt)
- [Windows Forms and WPF Comeback: .NET 6 and 7. Our Commitment to Windows Applications](https://www.textcontrol.com/blog/2022/08/17/windows-forms-and-wpf-comeback-net-6-and-7-our-commitment-to-windows-applications/llms.txt)
- [Visual Studio 2022 and .NET 5, 6 and 7 (Preview) Support and Strategy](https://www.textcontrol.com/blog/2022/08/11/visual-studio-2022-net-5-6-7-support-and-strategy/llms.txt)
- [Sneak Peek 31.0: Signature Fields](https://www.textcontrol.com/blog/2022/05/27/sneak-peek-310-signature-fields/llms.txt)
- [Sneak Peek 31.0: Full .NET 6 Visual Studio Designer Support](https://www.textcontrol.com/blog/2022/05/27/sneak-peek-31-full-net-6-visual-studio-designer-support/llms.txt)
- [Migrate a Windows Forms Desktop Application to .NET 6](https://www.textcontrol.com/blog/2021/12/21/migrate-a-windows-forms-desktop-application-to-dotnet-6/llms.txt)
- [Using MailMerge with Chart Objects and JSON Data](https://www.textcontrol.com/blog/2019/07/18/using-mailmerge-with-chart-objects-and-json-data/llms.txt)
