Hi,
We want to present the data from a UD Monitor in a Line Chart. We can’t seem to hide the time and date labels for the datapoints the monitor outputs on the x axes of the graph. Looked at using the Options and Scale Ticks configurations to set the ‘display’ value to false however, this doesn’t seem to do anything. Date and Time still seem to appear along the x axis.
Current code:
New-UdMonitor -Title “Memory %” -Type Line -Width 20vw -Height 22vw -DataPointHistory 5 -RefreshInterval 5 -ChartBackgroundColor “#103C89 ” -Endpoint {
$HostRAM | Out-UDMonitorData
} -Options @{
scales = @{
yAxes = @(
@{
ticks = @{
beginAtZero = $true
min = 0
max = 100
}
}
)
xAxes = @(
@{
scalelabel = @{
display = $false
}
}
)
}
legend = @{
display = $false
}
}
adam
May 29, 2020, 1:19am
2
Have you tried setting the axis to display: false?
New-UdMonitor -Title “Memory %” -Type Line -Width 20vw -Height 22vw -DataPointHistory 5 -RefreshInterval 5 -ChartBackgroundColor “#103C89” -Endpoint {
$HostRAM | Out-UDMonitorData
} -Options @{
scales = @{
yAxes = @(
@{
ticks = @{
beginAtZero = $true
min = 0
max = 100
}
}
)
xAxes = @(
@{
display = $false
}
)
}
legend = @{
display = $false
}
}
I’ll spin up a dashboard in a bit but off the top of my head that’s what I noticied. https://www.chartjs.org/docs/latest/axes/
I tried it on 2.9.0 and doesn’t seem to be working for me.
New-UDMonitor -Title "DatagramsPersec" -Type Line -Width 20vw -Height 22vw -DataPointHistory 200 -RefreshInterval 1 -ChartBackgroundColor “#103C89” -Endpoint {
$dataGramObj = Get-WmiObject -class "Win32_PerfRawData_Tcpip_IPv6"
Select-Object -InputObject $dataGramObj -ExpandProperty DatagramsPersec | Out-UDMonitorData
} -Options @{
scales = @{
yAxes = @(
@{
ticks = @{
beginAtZero = $true
min = 0
max = 100
}
}
)
xAxes = @(
@{
display = $false
}
)
}
legend = @{
display = $false
}
}
adam
May 29, 2020, 3:52pm
4
Thanks for giving it a shot. I’ll see if I can figure it out.
adam
June 1, 2020, 7:32pm
5
This is a bug. We are hard-coding that x-axis even if you specify the options. That’s why it doesn’t work with the monitor.
2 Likes
Thanks Adam. Please advise when we can test.
Regards
Joe
1 Like