Hi,
I’m trialing the software and have found the docs to be OKAY. Hard to find certain things but with enough effort it can be found.
I’ve played around with these cmdlets and I cannot for the life of me figure out how to put 2 charts on the same row on a dashboard. I’ve spent a few hours searching and toying.
New-UDLayout
New-UDSplitPane
New-UDRow
I am NOT interested in multiple dashboard pages or tabs. I want multiple charts on a single screen.
I have 1 donut and 1 bar chart. I’ve tried the following but all of them produce a result that is 2 charts, both full page width and each on their own row. I tried new row, new column, new column with nested new row, new layout with 2 columns, new split pane with direction horizontal. Here is my code with new row implemented:
New-UDDashboard -Title 'VMDK Dashboard' -Content {
$csv = '\\server\share$\Reports\VMDK_Report\VMDK_Report.csv'
$objVMDK = Import-Csv -Path $csv
New-UDRow -Columns {
# Provisioned Types
$pTypes = $objVMDK |
Group-Object -Property 'VmdkProvisioned' -NoElement |
Sort-Object -Property 'Name'
$ptProps = @{
Type = 'doughnut'
Data = $pTypes
DataProperty = 'Count'
LabelProperty = 'Name'
HoverBorderColor = 'black'
HoverBackgroundColor = 'Green'
BackgroundColor = @(
'#d98919'
'#741010'
'#4b82d3'
)
Options = @{
title = @{
display = $true
text = 'Provisioned Types'
}
}
}
New-UDChartJS @ptProps
# VMDKs per vCenter - Top Servers by VMDK Count
$pVC = $objVMDK |
Group-Object -Property 'VIServer' |
Sort-Object -Property 'Count' -Descending
#
$pvcProps = @{
Type = 'bar'
Data = $pVC
DataProperty = 'Count'
LabelProperty = 'Name'
HoverBorderColor = 'black'
HoverBackgroundColor = 'Green'
Options = @{
title = @{
display = $true
text = 'VMDKs per vCenter - Top Servers by VMDK Count'
}
}
}
New-UDChartJS @pvcProps
# }
}
}
Please help.
Product: PowerShell Universal
Version: 2.9.2