Configuring New-UDChartJSMonitor

Product: PowerShell Universal
Version: 1.5.16

Hi all,

Was wondering how I would go about configuring how the UDChartJSMonitor graphs are displayed on the dashboard.
Currently I have the following code to query the amount of active RDUserSessions on a certain host;

New-UDChartJSMonitor -LoadData {
    $HostServer = $RDServer.CN
    $ActiveSessionCount = Invoke-RestMethod -Uri "https://notlocalhost:1234/GetActiveSessionCount/$HostServer"
    $ActiveSessionCount | Out-UDChartJSMonitorData
} -Labels 'Active UserSessions' -ChartBackgroundColor "#7db800" -RefreshInterval 60

Which results in the following graph;

Obviously, showing decimals isn’t really that useful here - same as only showing 7 to 9…

How would I go about showing from 0 to some set number, without any decimals, statically?

Thanks in advance!

Hi, you need to look in to the options part of the Charts to configure this.
I had the following in a previous dashboard (not the latest version) but if you check the options on the documentation, you can see its similar to this one.
Charts - PowerShell Universal

To make Graph start on 0

$options = @{scales = @{
        yAxes = @(
                ticks = @{
                    beginAtZero = $true

I honestly don’t know how I have missed this while reading the documentation like… multiple times over :’)

This should get me far enough!