Cmdlet
Set-OfficeExcelChartDataLabels
Configures data labels and optional styling for an Excel chart.
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 <OfficeChartDataLabelPosition>]
[-ShowCategoryName <Boolean>]
[-ShowLegendKey <Boolean>]
[-ShowPercent <Boolean>]
[-ShowSeriesName <Boolean>]
[-ShowValue <Boolean>]
[-SourceLinked <Boolean>]
[<CommonParameters>]#Parameter set:
All Parameter SetsExamples
Add outside-end value labels.
$chart | Set-OfficeExcelChartDataLabels -ShowValue $true -Position OutsideEndAdds value labels to the chart and returns the chart for further formatting.
Parameters
- -Bold Boolean
- Optional bold setting for label text.
- -Chart ExcelChart
- Chart to update.
- -Color String
- Optional label text color. Named colors and hexadecimal values are accepted.
- -FillColor String
- Optional label fill color. Named colors and hexadecimal values are accepted.
- -FontName String
- Optional label font name.
- -FontSizePoints Double
- Optional label font size in points.
- -Italic Boolean
- Optional italic setting for label text.
- -LineColor String
- Optional label line color. Named colors and hexadecimal values are accepted.
- -LineWidthPoints Double
- Optional label border width in points.
- -NoFill SwitchParameter
- Remove label fill.
- -NoLine SwitchParameter
- Remove label border.
- -NumberFormat String
- Optional number format code.
- -PassThru SwitchParameter
- Emit the object created or changed by the command.
- -Position OfficeChartDataLabelPosition
- Optional data label position.
- Possible values:
BestFit,Bottom,Center,InsideBase,InsideEnd,Left,OutsideEnd,Right,Top - -ShowCategoryName Boolean
- Show category names in labels.
- -ShowLegendKey Boolean
- Show legend keys in labels.
- -ShowPercent Boolean
- Show percentages in labels.
- -ShowSeriesName Boolean
- Show series names in labels.
- -ShowValue Boolean
- Show values in labels.
- -SourceLinked Boolean
- Keep number formatting linked to the source cells.
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.