Scripts/New-UDCircle.ps1

<#
.SYNOPSIS
    Sample control for UniversalDashboard.
.DESCRIPTION
    Sample control function for UniversalDashboard. This function must have an ID and return a hash table.
.PARAMETER Id
    An id for the component default value will be generated by new-guid.
.EXAMPLE
    PS C:\> New-UDCircle -Size 125 -LineWidth 26 -Progress 77 -BackGroundColor '#c05746' -TextColor '#000' -ProgressColor "#313b72"
    Loads a ud-circle with the values set in the above parameters
.INPUTS
    Inputs (if any)
.OUTPUTS
    Output (if any)
.NOTES
    Bigup to https://www.npmjs.com/package/react-circle
#>

function New-UDCircle {
    param(
        [Parameter()]
        [string]$Id = (New-Guid).ToString(),
        [Parameter()]
        [bool]$Responsive = $true,
        [Parameter()]
        [int]$Size = 150,
        [Parameter()]
        [int]$LineWidth = 14,
        [Parameter()]
        [int]$Progress,
        [Parameter()]
        [String]$ProgressColor = "cornflowerblue",
        [Parameter()]
        [String]$BackGroundColor = "whitesmoke",
        [Parameter()]
        [String]$TextColor = "hotpink",
        [Parameter()]
        [hashtable]$TextStyle = @{font = 'bold 5rem Helvetica, Arial, sans-serif' },
        [Parameter()]
        [int]$PercentSpacing = 10,
        [Parameter()]
        [bool]$RoundedStroke = $true,
        [Parameter()]
        [bool]$ShowText = $true,
        [Parameter()]
        [bool]$ShowSymbol = $true
    )

    End {

        @{
            # The AssetID of the main JS File
            assetId              = $AssetId
            # Tell UD this is a plugin
            isPlugin             = $true
            # This ID must be the same as the one used in the JavaScript to register the control with UD
            type                 = "UD-Circle"
            # An ID is mandatory
            id                   = $Id

            # This is where you can put any other properties. They are passed to the React control's props
            # The keys are case-sensitive in JS.
            responsive           = $Responsive
            size                 = $Size
            lineWidth            = $LineWidth
            progress             = $Progress
            progressColor        = $ProgressColor
            bgColor              = $BackGroundColor
            textColor            = $TextColor
            textStyle            = $TextStyle
            percentSpacing       = $PercentSpacing
            roundedStroke        = $RoundedStroke
            showPercentage       = $ShowText
            showPercentageSymbol = $ShowSymbol


        }

    }
}