Project

PSWriteHTML

Generate HTML reports, dashboards, and emails from PowerShell without writing HTML, CSS, or JavaScript.

Stars 1,023
Forks 115
Open issues 54
PowerShell Gallery downloads 7,576,901
Release v1.45.0
Language: PowerShell Updated: 2026-11-03
Command

New-MapLegendSlice

Module
PSWriteHTML

Creates a new map legend slice.

Syntax

New-MapLegendSlice
[[-DisplayInLegend] <Nullable`1>]
[[-FillColor] <String>]
[[-HoverFillColor] <String>]
[[-HoverStrokeWidth] <Nullable`1>]
[[-HoverTransform] <String>]
[[-InitializeClicked] <Nullable`1>]
[[-Label] <String>]
[[-MaximumValue] <Nullable`1>]
[[-MinimumValue] <Nullable`1>]
[[-Size] <Nullable`1>]
[[-StrokeWidth] <Nullable`1>]
[[-Transform] <String>]
[-Type] <area|plot>
[[-Value] <Nullable`1>]
[<CommonParameters>]
#
Parameter set: All Parameter Sets

Description

This function creates a new map legend slice with specified parameters.

Examples

Example 1

New-MapLegendSlice -Label "Slice 1" -FillColor "Blue" -MinimumValue 0 -MaximumValue 100 -DisplayInLegend $true

Parameters

-DisplayInLegend Nullable<T> optionalposition: 11
Specifies whether to display the slice in the legend. Default is true.
-FillColor String optionalposition: 2aliases: SliceColor
The color to fill the slice with.
-HoverFillColor String optionalposition: 3aliases: HoverSliceColor
-HoverStrokeWidth Nullable<T> optionalposition: 7
-HoverTransform String optionalposition: 6
-InitializeClicked Nullable<T> optionalposition: 12
Set to true to initialize the legend item in the 'clicked' state on map load. Default is false.
-Label String optionalposition: 1
The label of the slice for the legend.
-MaximumValue Nullable<T> optionalposition: 9
The maximum value for the interval defining the slice.
-MinimumValue Nullable<T> optionalposition: 8
The minimum value for the interval defining the slice.
-Size Nullable<T> optionalposition: 13
-StrokeWidth Nullable<T> optionalposition: 4
-Transform String optionalposition: 5
-Type Object requiredposition: 0
Possible values: area, plot
-Value Nullable<T> optionalposition: 10
The fixed value for the slice. Use this instead of 'MinimumValue' and 'MaximumValue' to set a specific value.

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.