Project

PSWriteOffice

PowerShell document automation across Word, Excel, PowerPoint, PDF, Reader, Confluence, Visio, and open text formats.

Stars 159
Forks 14
PowerShell Gallery downloads 158,661
Release v3.0.5
Language: C# Updated: 2026-09-03

API Reference

Cmdlet

Set-OfficeExcelChartDataLabels

Namespace PSWriteOffice
Inputs
OfficeIMO.Excel.ExcelChart
Outputs
OfficeIMO.Excel.ExcelChart

Configures data labels and optional styling for an Excel chart.

Remarks

Configures data labels and optional styling for an Excel chart.

Examples

Authored help example

Add outside-end value labels.

PS>


$chart | Set-OfficeExcelChartDataLabels -ShowValue $true -Position OutsideEnd
        

Adds value labels to the chart and returns the chart for further formatting.

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.

Syntax

Set-OfficeExcelChartDataLabels [-Bold <Boolean>] -Chart <ExcelChart> [-Color <String>] [-FillColor <String>] [-FontName <String>] [-FontSizePoints <Double>] [-Italic <Boolean>] [-LineColor <String>] [-LineWidthPoints <Double>] [-NoFill] [-NoLine] [-NumberFormat <String>] [-PassThru] [-Position <BestFit>] [-ShowCategoryName <Boolean>] [-ShowLegendKey <Boolean>] [-ShowPercent <Boolean>] [-ShowSeriesName <Boolean>] [-ShowValue <Boolean>] [-SourceLinked <Boolean>] [<CommonParameters>]
#
Parameter set: All Parameter Sets

Parameters

Bold Boolean optionalposition: namedpipeline: False
Optional bold setting for label text.
Chart ExcelChart requiredposition: namedpipeline: True (ByValue)
Chart to update.
Color String optionalposition: namedpipeline: False
Optional label text color. Named colors and hexadecimal values are accepted.
FillColor String optionalposition: namedpipeline: False
Optional label fill color. Named colors and hexadecimal values are accepted.
FontName String optionalposition: namedpipeline: False
Optional label font name.
FontSizePoints Double optionalposition: namedpipeline: False
Optional label font size in points.
Italic Boolean optionalposition: namedpipeline: False
Optional italic setting for label text.
LineColor String optionalposition: namedpipeline: False
Optional label line color. Named colors and hexadecimal values are accepted.
LineWidthPoints Double optionalposition: namedpipeline: False
Optional label border width in points.
NoFill SwitchParameter optionalposition: namedpipeline: False
Remove label fill.
NoLine SwitchParameter optionalposition: namedpipeline: False
Remove label border.
NumberFormat String optionalposition: namedpipeline: False
Optional number format code.
PassThru SwitchParameter optionalposition: namedpipeline: False
Emit the object created or changed by the command.
Position OfficeChartDataLabelPosition optionalposition: namedpipeline: Falsevalues: 9
Optional data label position.
Possible values: BestFit, Bottom, Center, InsideBase, InsideEnd, Left, OutsideEnd, Right, Top
ShowCategoryName Boolean optionalposition: namedpipeline: False
Show category names in labels.
ShowLegendKey Boolean optionalposition: namedpipeline: False
Show legend keys in labels.
ShowPercent Boolean optionalposition: namedpipeline: False
Show percentages in labels.
ShowSeriesName Boolean optionalposition: namedpipeline: False
Show series names in labels.
ShowValue Boolean optionalposition: namedpipeline: False
Show values in labels.
SourceLinked Boolean optionalposition: namedpipeline: False
Keep number formatting linked to the source cells.

Outputs

OfficeIMO.Excel.ExcelChart