# ChartCallback Function

> Callback function for a chart related event. (see also TXTextControl.addEventListener function)

- **Product:** DS Server
- **Section:** Reference
- **Kind:** Function
- **Introduced:** 28.0
- **Path:** DS Server > Reference > JavaScript API > ChartCallback Function
- **179 words**
- **Web URL:** https://docs.textcontrol.com/ds-server/reference/javascript/chartcallback/
- **LLMs URL:** https://docs.textcontrol.com/ds-server/reference/javascript/chartcallback/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/ds-server/reference/javascript/chartcallback/llms-full.txt

---

### Description

Callback function for a chart related event. (see also [TXTextControl.addEventListener function](https://docs.textcontrol.com/ds-server/reference/javascript/txtextcontrol/addeventlistener-method/llms-full.txt))

### Syntax

```javascript
function(<ChartEventArgs> args)
```

### Examples

The following example demonstrates `ChartCallback` in a practical document-editing workflow. Callback function for a chart related event. (see also TXTextControl.addEventListener function).

```javascript
function chartCallback(args) {
    console.log("args:", args);
}
```

---

## Nearby

- **Previous:** [CannotTrackChangeCallback Function](https://docs.textcontrol.com/ds-server/reference/javascript/cannottrackchangecallback/llms-full.txt)
- **Next:** [ChartEventArgs Object](https://docs.textcontrol.com/ds-server/reference/javascript/charteventargs/llms-full.txt)
