Evotec

Project

PSWriteHTML

PSWriteHTML is an open-source PowerShell project with packages, release history, and working documentation.

Stars 995
Forks 114
Open issues 69
PowerShell Gallery downloads 7,436,513
Release v1.41.0
Language: PowerShell Updated: 2026-04-11

API Reference

Function

New-HTMLGage

Namespace PSWriteHTML

Creates a new HTML gauge with customizable options.

Remarks

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.

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

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

Parameters

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