Project

PSWriteHTML

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

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

New-HTMLGage

Module PSWriteHTML

Creates a new HTML gauge with customizable options.

Syntax

New-HTMLGage [[-BackgroundGaugageColor] <String>] [-Counter] [[-DecimalNumbers] <Int32>] [-Differential] [-DisplayRemaining] [[-DonutStartAngle] <Nullable`1>] [-FormatNumber] [[-GageContent] <ScriptBlock>] [[-GaugageWidth] <Decimal>] [[-Height] <Nullable`1>] [-HideMinMax] [-HideValue] [-HumanFriendly] [[-HumanFriendlyDecimal] <Int32>] [[-Label] <String>] [[-LabelColor] <String>] [[-LabelMinFontSize] <Nullable`1>] [[-LevelColors] <String[]>] [[-MaxLabelMinFontSize] <Nullable`1>] [[-MaxText] <String>] [[-MaxValue] <Nullable`1>] [[-MinLabelMinFontSize] <Nullable`1>] [[-MinText] <String>] [[-MinValue] <Nullable`1>] [-NoGradient] [-Pointer] [[-PointerBottomLength] <Nullable`1>] [[-PointerBottomWidth] <Nullable`1>] [[-PointerColor] <String>] [[-PointerStrokeLinecap] <square|round>] [[-PointerStrokeWidth] <Nullable`1>] [[-PointerTopLength] <Nullable`1>] [[-RefreshAnimationTime] <Nullable`1>] [[-RefreshAnimationType] <linear|>|<|<>|bounce>] [-Reverse] [[-SectorColors] <String[]>] [[-ShadowOpacity] <Nullable`1>] [[-ShadowSize] <Nullable`1>] [[-ShadowVerticalOffset] <Nullable`1>] [-ShowInnerShadow] [[-StartAnimationTime] <Nullable`1>] [[-StartAnimationType] <linear|>|<|<>|bounce>] [[-StrokeColor] <String>] [[-TargetLine] <Nullable`1>] [[-TargetLineColor] <String>] [[-TargetLineWidth] <Nullable`1>] [[-Type] <Gage|Donut>] [-UseAbsoluteValues] [-Value] <Decimal> [[-ValueColor] <String>] [[-ValueFont] <String>] [[-ValueMinFontSize] <Nullable`1>] [[-ValueSymbol] <String>] [[-Width] <Nullable`1>] [<CommonParameters>]
#
Parameter set: All Parameter Sets

Description

This function creates a new HTML gauge with various customizable options such as type, colors, fonts, values, and more.

Examples

Authored help example

EXAMPLE 1

New-HTMLGage -Value 75 -Label "Progress" -Type "Donut" -MinValue 0 -MaxValue 100 -SectorColors @("red", "yellow", "green")

Creates a new donut gauge with a value of 75, labeled as "Progress", with a range from 0 to 100, and sector colors red, yellow, and green.

EXAMPLE 2

New-HTMLGage -Value 65 -Label "Performance" -MinValue 0 -MaxValue 100 -TargetLine 80 -TargetLineColor "red" -TargetLineWidth 3

Creates a gauge with a target line at 80 to show the goal.

Parameters

-BackgroundGaugageColor String optionalposition: 2
The background color of the gauge.
-Counter SwitchParameter optional
Indicates whether a counter should be displayed.
-DecimalNumbers Int32 optionalposition: 11
The number of decimal places to display.
-Differential SwitchParameter optional
Indicates whether the gauge should fill from center rather than from min value.
-DisplayRemaining SwitchParameter optional
Indicates whether the remaining value should be displayed.
-DonutStartAngle Nullable`1 optionalposition: 34
Angle to start from when in donut mode (default: 90).
-FormatNumber SwitchParameter optional
Indicates whether the number should be formatted.
-GageContent ScriptBlock optionalposition: 0
The content of the gauge.
-GaugageWidth Decimal optionalposition: 12
The width of the gauge.
-Height Nullable`1 optionalposition: 28
The gauge height in pixels.
-HideMinMax SwitchParameter optional
Indicates whether the min/max values should be hidden.
-HideValue SwitchParameter optional
Indicates whether the value should be hidden.
-HumanFriendly SwitchParameter optional
Indicates whether the value should be displayed in a human-friendly format.
-HumanFriendlyDecimal Int32 optionalposition: 25
The number of decimal places to display in human-friendly format.
-Label String optionalposition: 13
The label to display on the gauge.
-LabelColor String optionalposition: 14
The color of the label.
-LabelMinFontSize Nullable`1 optionalposition: 36
Absolute minimum font size for the label (default: 10).
-LevelColors String[] optionalposition: 29
An array of colors for default gradient sectors (e.g., @("green", "yellow", "red")).
-MaxLabelMinFontSize Nullable`1 optionalposition: 38
Absolute minimum font size for the max label (default: 10).
-MaxText String optionalposition: 10
The text to display for the maximum value.
-MaxValue Nullable`1 optionalposition: 9
The maximum value of the gauge.
-MinLabelMinFontSize Nullable`1 optionalposition: 37
Absolute minimum font size for the min label (default: 10).
-MinText String optionalposition: 8
The text to display for the minimum value.
-MinValue Nullable`1 optionalposition: 7
The minimum value of the gauge.
-NoGradient SwitchParameter optional
Indicates whether gradient should be disabled.
-Pointer SwitchParameter optional
Indicates whether a pointer should be displayed.
-PointerBottomLength Nullable`1 optionalposition: 19
The length of the bottom of the pointer.
-PointerBottomWidth Nullable`1 optionalposition: 20
The width of the bottom of the pointer.
-PointerColor String optionalposition: 24
The color of the pointer.
-PointerStrokeLinecap Object optionalposition: 23
The linecap style of the pointer stroke. Valid values are 'none', 'square', 'round'.
Possible values: square, round
-PointerStrokeWidth Nullable`1 optionalposition: 22
The width of the pointer stroke.
-PointerTopLength Nullable`1 optionalposition: 18
The length of the top of the pointer.
-RefreshAnimationTime Nullable`1 optionalposition: 32
Length of refresh animation in milliseconds (default: 700).
-RefreshAnimationType String optionalposition: 33
Type of refresh animation. Valid values are 'linear', '>', '<', '<>', 'bounce'.
Possible values: linear, >, <, <>, bounce
-Reverse SwitchParameter optional
Indicates whether the gauge should be displayed in reverse.
-SectorColors String[] optionalposition: 26
An array of colors to use for different sectors of the gauge. .PARAMETER UseAbsoluteValues Indicates whether to use absolute values for custom sectors. By default, it uses percentage values.
-ShadowOpacity Nullable`1 optionalposition: 15
The opacity of the shadow.
-ShadowSize Nullable`1 optionalposition: 16
The size of the shadow.
-ShadowVerticalOffset Nullable`1 optionalposition: 17
The vertical offset of the shadow.
-ShowInnerShadow SwitchParameter optional
Indicates whether an inner shadow should be displayed.
-StartAnimationTime Nullable`1 optionalposition: 30
Length of initial animation in milliseconds (default: 700).
-StartAnimationType String optionalposition: 31
Type of initial animation. Valid values are 'linear', '>', '<', '<>', 'bounce'.
Possible values: linear, >, <, <>, bounce
-StrokeColor String optionalposition: 21
The color of the stroke.
-TargetLine Nullable`1 optionalposition: 39
Value where target line will be displayed.
-TargetLineColor String optionalposition: 40
Color of the target line (default: "#000000").
-TargetLineWidth Nullable`1 optionalposition: 41
Width of the target line (default: 1.5).
-Type String optionalposition: 1
Specifies the type of gauge to create. Valid values are 'Gage' and 'Donut'. Default is 'Gage'.
Possible values: Gage, Donut
-UseAbsoluteValues SwitchParameter optional
-Value Decimal requiredposition: 3
The value to display on the gauge. This parameter is mandatory.
-ValueColor String optionalposition: 5
The color of the value displayed on the gauge.
-ValueFont String optionalposition: 6
The font of the value displayed on the gauge.
-ValueMinFontSize Nullable`1 optionalposition: 35
Absolute minimum font size for the value label (default: 16).
-ValueSymbol String optionalposition: 4
The symbol to display with the value.
-Width Nullable`1 optionalposition: 27
The gauge width in pixels.

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.