# New-ChartEvent

Creates a new chart event for a specified DataTable. Review available syntax, parameters, pipeline guidance, and reference details in PSWriteHTML API Reference.

Project

PSWriteHTML

Generate HTML reports, dashboards, and emails from PowerShell without writing HTML, CSS, or JavaScript.

[View on GitHub](https://github.com/EvotecIT/PSWriteHTML) [Visit Website](#) [Releases](https://github.com/EvotecIT/PSWriteHTML/releases/tag/v1.41.0) [Changelog](#) [Get package](https://www.powershellgallery.com/packages/PSWriteHTML/1.40.0)

Stars **1,025**

Forks **114**

Open issues 

PowerShell Gallery downloads **7,576,901**

Release **v1.45.0**

Language: PowerShell Updated: 2026-11-19

Command 

**Module**

`PSWriteHTML`

Creates a new chart event for a specified DataTable.

## Syntax

```
New-ChartEvent
[-ColumnID] <Int32>
[-DataTableID] <String>
[-EscapeRegex]
[<CommonParameters>]
```

[#](#method-new-chartevent-int32-string-switchparameter)

Parameter set: `All Parameter Sets`

## Description

This function creates a new chart event for a specified DataTable. It allows for defining events like click, data point selection, and marker click for the chart.

## Examples

### Example 1

```powershell
New-ChartEvent -DataTableID "table1" -ColumnID 1 -EscapeRegex
Creates a new chart event for DataTable with ID "table1" on column 1 with regular expression escaping enabled.
```

### Example 2

```powershell
New-ChartEvent -DataTableID "table2" -ColumnID 2
Creates a new chart event for DataTable with ID "table2" on column 2 without regular expression escaping.
```

## Parameters

**-ColumnID Int32 requiredposition: 1**

Specifies the ID of the column in the DataTable for which the chart event is being created.

**-DataTableID String requiredposition: 0**

Specifies the ID of the DataTable for which the chart event is being created.

**-EscapeRegex SwitchParameter optional**

Indicates whether to escape regular expressions in the chart event.

## Common Parameters

This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.

For more information, see [about_CommonParameters](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_commonparameters).

Evotec API Reference Copyright 2026 Evotec Services

<!-- PowerForge markdown artifact sha256:728EB1B6EC14338CEECEF2619278B4ED16628147FE95F8D61A70CB1C238F9CC0 -->
