API Reference
Command
Set-OfficeExcelChartDataLabels
Configures data labels and optional styling for an Excel chart.
Remarks
Configures data labels and optional styling for an Excel chart.
Examples
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 <Nullable`1>] -Chart <ExcelChart> [-Color <String>] [-FillColor <String>] [-FontName <String>] [-FontSizePoints <Nullable`1>] [-Italic <Nullable`1>] [-LineColor <String>] [-LineWidthPoints <Nullable`1>] [-NoFill] [-NoLine] [-NumberFormat <String>] [-Position <BestFit>] [-ShowCategoryName <Boolean>] [-ShowLegendKey <Boolean>] [-ShowPercent <Boolean>] [-ShowSeriesName <Boolean>] [-ShowValue <Boolean>] [-SourceLinked <Boolean>] [<CommonParameters>]#Parameter set:
All Parameter SetsParameters
- Bold Nullable`1
- Optional bold setting for label text.
- Chart ExcelChart
- Chart to update.
- Color String
- Optional label text color in hex format.
- FillColor String
- Optional label fill color in hex format.
- FontName String
- Optional label font name.
- FontSizePoints Nullable`1
- Optional label font size in points.
- Italic Nullable`1
- Optional italic setting for label text.
- LineColor String
- Optional label line color in hex format.
- LineWidthPoints Nullable`1
- Optional label border width in points.
- NoFill SwitchParameter
- Remove label fill.
- NoLine SwitchParameter
- Remove label border.
- NumberFormat String
- Optional number format code.
- Position String
- 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.
Outputs
OfficeIMO.Excel.ExcelChart