New-HTMLGage
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>]#All Parameter SetsDescription
This function creates a new HTML gauge with various customizable options such as type, colors, fonts, values, and more.
Examples
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 3Creates a gauge with a target line at 80 to show the goal.
Parameters
- -BackgroundGaugageColor String
- The background color of the gauge.
- -Counter SwitchParameter
- Indicates whether a counter should be displayed.
- -DecimalNumbers Int32
- The number of decimal places to display.
- -Differential SwitchParameter
- Indicates whether the gauge should fill from center rather than from min value.
- -DisplayRemaining SwitchParameter
- Indicates whether the remaining value should be displayed.
- -DonutStartAngle Nullable<T>
- Angle to start from when in donut mode (default: 90).
- -FormatNumber SwitchParameter
- Indicates whether the number should be formatted.
- -GageContent ScriptBlock
- The content of the gauge.
- -GaugageWidth Decimal
- The width of the gauge.
- -Height Nullable<T>
- The gauge height in pixels.
- -HideMinMax SwitchParameter
- Indicates whether the min/max values should be hidden.
- -HideValue SwitchParameter
- Indicates whether the value should be hidden.
- -HumanFriendly SwitchParameter
- Indicates whether the value should be displayed in a human-friendly format.
- -HumanFriendlyDecimal Int32
- The number of decimal places to display in human-friendly format.
- -Label String
- The label to display on the gauge.
- -LabelColor String
- The color of the label.
- -LabelMinFontSize Nullable<T>
- Absolute minimum font size for the label (default: 10).
- -LevelColors String[]
- An array of colors for default gradient sectors (e.g., @("green", "yellow", "red")).
- -MaxLabelMinFontSize Nullable<T>
- Absolute minimum font size for the max label (default: 10).
- -MaxText String
- The text to display for the maximum value.
- -MaxValue Nullable<T>
- The maximum value of the gauge.
- -MinLabelMinFontSize Nullable<T>
- Absolute minimum font size for the min label (default: 10).
- -MinText String
- The text to display for the minimum value.
- -MinValue Nullable<T>
- The minimum value of the gauge.
- -NoGradient SwitchParameter
- Indicates whether gradient should be disabled.
- -Pointer SwitchParameter
- Indicates whether a pointer should be displayed.
- -PointerBottomLength Nullable<T>
- The length of the bottom of the pointer.
- -PointerBottomWidth Nullable<T>
- The width of the bottom of the pointer.
- -PointerColor String
- The color of the pointer.
- -PointerStrokeLinecap Object
- The linecap style of the pointer stroke. Valid values are 'none', 'square', 'round'.
- Possible values:
square,round - -PointerStrokeWidth Nullable<T>
- The width of the pointer stroke.
- -PointerTopLength Nullable<T>
- The length of the top of the pointer.
- -RefreshAnimationTime Nullable<T>
- Length of refresh animation in milliseconds (default: 700).
- -RefreshAnimationType String
- Type of refresh animation. Valid values are 'linear', '>', '<', '<>', 'bounce'.
- Possible values:
linear,>,<,<>,bounce - -Reverse SwitchParameter
- Indicates whether the gauge should be displayed in reverse.
- -SectorColors String[]
- 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<T>
- The opacity of the shadow.
- -ShadowSize Nullable<T>
- The size of the shadow.
- -ShadowVerticalOffset Nullable<T>
- The vertical offset of the shadow.
- -ShowInnerShadow SwitchParameter
- Indicates whether an inner shadow should be displayed.
- -StartAnimationTime Nullable<T>
- Length of initial animation in milliseconds (default: 700).
- -StartAnimationType String
- Type of initial animation. Valid values are 'linear', '>', '<', '<>', 'bounce'.
- Possible values:
linear,>,<,<>,bounce - -StrokeColor String
- The color of the stroke.
- -TargetLine Nullable<T>
- Value where target line will be displayed.
- -TargetLineColor String
- Color of the target line (default: "#000000").
- -TargetLineWidth Nullable<T>
- Width of the target line (default: 1.5).
- -Type String
- Specifies the type of gauge to create. Valid values are 'Gage' and 'Donut'. Default is 'Gage'.
- Possible values:
Gage,Donut - -UseAbsoluteValues SwitchParameter
- -Value Decimal
- The value to display on the gauge. This parameter is mandatory.
- -ValueColor String
- The color of the value displayed on the gauge.
- -ValueFont String
- The font of the value displayed on the gauge.
- -ValueMinFontSize Nullable<T>
- Absolute minimum font size for the value label (default: 16).
- -ValueSymbol String
- The symbol to display with the value.
- -Width Nullable<T>
- 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.