Project

PSWriteHTML

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

Stars 1,023
Forks 115
Open issues 54
PowerShell Gallery downloads 7,576,901
Release v1.45.0
Language: PowerShell Updated: 2026-11-03
Command

New-ChartDataLabel

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>]
#
Parameter set: All Parameter Sets

Examples

Example 1

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.