Hi All
I’m having a problem getting the columns colored, and getting the data in the array to show up
New-UDDashboard -Title ‘PowerShell Universal’ -Pages @(
New-UDPage -Name ‘Home’ -Content {
$data = @()
$data += [PSCustomObject]@{
date = [datetime]"2024-01-15"
name = [string]"AB-PAS"
count = 2
color = [string]"#960588"
}
$data += [PSCustomObject]@{
date = [datetime]"2024-01-15"
name = [string]"AB-SI"
count = 5
color = [string]"#fca119"
}
$data += [PSCustomObject]@{
date = [datetime]"2024-01-15"
name = [string]"Afparaffinering"
count = 8
color = [string]"#02730c"
}
$data += [PSCustomObject]@{
date = [datetime]"2024-01-15"
name = [string]"Dehydrering"
count = 1
color = [string]"#000763"
}
$data += [PSCustomObject]@{
date = [datetime]"2024-01-14"
name = [string]"Dehydrering"
count = 15
color = [string]"#000763"
}
$data += [PSCustomObject]@{
date = [datetime]"2024-01-14"
name = [string]"Afparaffinering"
count = 12
color = [string]"#02730c"
}
$data += [PSCustomObject]@{
date = [datetime]"2024-01-13"
name = [string]"Afparaffinering"
count = 8
color = [string]"#02730c"
}
$data += [PSCustomObject]@{
date = [datetime]"2024-01-13"
name = [string]"Dehydrering"
count = 1
color = [string]"#000763"
}
$data += [PSCustomObject]@{
date = [datetime]"2024-01-13"
name = [string]"Dehydrering"
count = 15
color = [string]"#000763"
}
$data += [PSCustomObject]@{
date = [datetime]"2024-01-13"
name = [string]"Afparaffinering"
count = 12
color = [string]"#02730c"
}
$Pattern = New-UDNivoPattern -Dots -Id 'dots' -Background "inherit" -Color "#38bcb2" -Size 4 -Padding 1 -Stagger
$Fill = New-UDNivoFill -ElementId "fries" -PatternId 'dots'
New-UDNivoChart -Id 'Chart' -Definitions $Pattern -Fill $Fill -Bar -Data $data -Height 400 -Width 900 -Keys @('name','count') -IndexBy 'date' -Colors @{datum='data.color'}
}
)