API Reference
Cmdlet
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 <Boolean>] -Chart <ExcelChart> [-Color <String>] [-FontName <String>] [-FontSizePoints <Double>] [-Hide] [-Italic <Boolean>] [-Overlay <Boolean>] [-PassThru] [-Position <Bottom|TopRight|Left|Right|Top>] [<CommonParameters>]#Parameter set:
All Parameter SetsParameters
- Bold Boolean
- Optional bold setting for legend text.
- Chart ExcelChart
- Chart to update.
- Color String
- Optional legend text color. Named colors and hexadecimal values are accepted.
- FontName String
- Optional legend font name.
- FontSizePoints Double
- Optional legend font size in points.
- Hide SwitchParameter
- Hide the legend instead of positioning it.
- Italic Boolean
- Optional italic setting for legend text.
- Overlay Boolean
- Overlay the legend on the chart area.
- PassThru SwitchParameter
- Emit the object created or changed by the command.
- Position OfficeChartLegendPosition
- Legend position.
- Possible values:
Bottom,TopRight,Left,Right,Top
Outputs
OfficeIMO.Excel.ExcelChart