# ChartEventArgs Class

> The ChartEventArgs class provides data for all events that occur with charts. These are the TextControl.ChartCreated, TextControl.ChartDeleted, TextControl.ChartClicked, TextControl.ChartDoubleClicked, TextControl.ChartRightClicked, TextControl.ChartMoved TextControl.ChartSelected, TextControl.ChartDeselected and TextControl.ChartSized events.

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Class
- **Introduced:** 18.0
- **Namespace:** `TXTextControl.DataVisualization`
- **Package:** `TXTextControl.TextControl.Core.SDK` (assembly `TXTextControl.Core.dll`, from the private NuGet feed or Text Control Offline Packages)
- **Package:** `TXTextControl.TextControl.ASP.SDK` (assembly `TXTextControl.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXTextControl.dll` from the setup
- **Inherits:** `System.EventArgs`
- **Path:** TX Text Control .NET Server > Reference > TXTextControl.DataVisualization > ChartEventArgs Class
- **853 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-datavisualization/charteventargs/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-datavisualization/charteventargs/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-datavisualization/charteventargs/llms-full.txt

---

### Description

The ChartEventArgs class provides data for all events that occur with charts. These are the [TextControl.ChartCreated](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textcontrol/chartcreated-event/llms-full.txt), [TextControl.ChartDeleted](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textcontrol/chartdeleted-event/llms-full.txt), [TextControl.ChartClicked](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textcontrol/chartclicked-event/llms-full.txt), [TextControl.ChartDoubleClicked](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textcontrol/chartdoubleclicked-event/llms-full.txt), [TextControl.ChartRightClicked](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textcontrol/chartrightclicked-event/llms-full.txt), [TextControl.ChartMoved](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textcontrol/chartmoved-event/llms-full.txt) [TextControl.ChartSelected](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textcontrol/chartselected-event/llms-full.txt), [TextControl.ChartDeselected](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textcontrol/chartdeselected-event/llms-full.txt) and [TextControl.ChartSized](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textcontrol/chartsized-event/llms-full.txt) events.

### Syntax

```csharp
public class ChartEventArgs : EventArgs
```

```vbnet
Public Class ChartEventArgs
    Inherits EventArgs
```

### Examples

The following example uses `ChartEventArgs.ChartFrame` while handling `ChartClicked`.

```csharp
textControl.ChartClicked += (_, e) =>
{
    if (e.ChartFrame != null)
    {
        e.ChartFrame.DescriptiveText = "Quarterly sales by region";
    }
};
```

```vbnet
AddHandler textControl.ChartClicked,
    Sub(sender, e)
        If e.ChartFrame IsNot Nothing Then
            e.ChartFrame.DescriptiveText = "Quarterly sales by region"
        End If
    End Sub
```

---

## In This Section

- [ChartEventArgs.ChartFrame Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-datavisualization/charteventargs/chartframe-property/llms-full.txt): Gets an object that represents the chart which causes the event. It is of the type DataVisualization.ChartFrame.

---

## Nearby

- **Previous:** [ChartCollection.Remove Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-datavisualization/chartcollection/remove-method/llms-full.txt)
- **Next:** [ChartEventArgs.ChartFrame Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-datavisualization/charteventargs/chartframe-property/llms-full.txt)
