# New-ChartDataLabel

Configures DataLabels for Charts. 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`

Configures DataLabels for Charts

## Syntax

```
New-ChartDataLabel
[-Distributed]
[-Enabled]
[[-FontColor] <String[]>]
[[-FontFamily] <String>]
[[-FontSize] <Object>]
[[-OffsetX] <Nullable`1>]
[[-OffsetY] <Nullable`1>]
[[-TextAnchor] <start|middle|end>]
[<CommonParameters>]
```

[#](#method-new-chartdatalabel-switchparameter-switchparameter-string-string-object-nullable-nullable-string)

Parameter set: `All Parameter Sets`

## Examples

### Example 1

```powershell
An example
```

## Parameters

**-Distributed SwitchParameter optional**

Similar to plotOptions.bar.distributed, this option makes each data-label discrete. So, when you provide an array of colors in datalabels.style.colors, the index in the colors array correlates with individual data-label index of all series.

**-Enabled SwitchParameter optional**

To determine whether to show dataLabels or not

**-FontColor String[] optionalposition: 5aliases: DataLabelsColor**

FontColors for the dataLabels. Accepts an array of string colors. Each index in the array corresponds to the series

**-FontFamily String optionalposition: 4**

FontFamily for the label

**-FontSize Object optionalposition: 3aliases: DataLabelsFontSize**

FontSize for the label

**-OffsetX Nullable<T> optionalposition: 1aliases: DataLabelsOffsetX**

Sets the left offset for dataLabels

**-OffsetY Nullable<T> optionalposition: 2**

Sets the top offset for dataLabels

**-TextAnchor String optionalposition: 0**

The alignment of text relative to dataLabel’s drawing position. Accepted values: start, middle, end

Possible values: `start`, `middle`, `end`

## 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:F0C1A193F801A5FCBB3D3E88DD0931F7964A5E7D31915BD446C58043754CA884 -->
