API Reference
Command
Set-OfficeExcelChartLegend
Configures legend visibility and styling for an Excel chart.
Remarks
Configures legend visibility and styling for an Excel chart.
Examples
Move the legend to the right.
PS>$chart | Set-OfficeExcelChartLegend -Position Right
Shows the legend on the right side of the chart and returns the chart for chaining.
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-OfficeExcelChartLegend [-Bold <Nullable`1>] -Chart <ExcelChart> [-Color <String>] [-FontName <String>] [-FontSizePoints <Nullable`1>] [-Hide] [-Italic <Nullable`1>] [-Overlay <Boolean>] [-Position <Bottom|Left|Right|Top|TopRight>] [<CommonParameters>]#Parameter set:
All Parameter SetsParameters
- Bold Nullable`1
- Optional bold setting for legend text.
- Chart ExcelChart
- Chart to update.
- Color String
- Optional legend text color in hex format.
- FontName String
- Optional legend font name.
- FontSizePoints Nullable`1
- Optional legend font size in points.
- Hide SwitchParameter
- Hide the legend instead of positioning it.
- Italic Nullable`1
- Optional italic setting for legend text.
- Overlay Boolean
- Overlay the legend on the chart area.
- Position String
- Legend position.
- Possible values:
Bottom,Left,Right,Top,TopRight
Outputs
OfficeIMO.Excel.ExcelChart