# New-MapLegendSlice

Creates a new map legend slice. Review available syntax, parameters, pipeline guidance, and reference details in PSWriteHTML API Reference.

Project

PSWriteHTML

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

[View on GitHub](https://github.com/EvotecIT/PSWriteHTML) [Visit Website](#) [Releases](https://github.com/EvotecIT/PSWriteHTML/releases/tag/v1.41.0) [Changelog](#) [Get package](https://www.powershellgallery.com/packages/PSWriteHTML/1.40.0)

Stars **1,025**

Forks **114**

Open issues 

PowerShell Gallery downloads **7,576,901**

Release **v1.45.0**

Language: PowerShell Updated: 2026-11-19

Command 

**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>]
```

[#](#method-new-maplegendslice-nullable-string-string-nullable-string-nullable-string-nullable-nullable-nullable-nullable-string-object-nullable)

Parameter set: `All Parameter Sets`

## Description

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

## Examples

### Example 1

```powershell
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](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_commonparameters).

Evotec API Reference Copyright 2026 Evotec Services

<!-- PowerForge markdown artifact sha256:6427D5AF1F75CE51ED49B43D891A417A0BE87C1521FE3F2D7A19753E9BA35254 -->
