Skip to content

Comparisons

Many items across many measures: matrix (a table of sparklines, one scale per column), parallel (drag along an axis to filter), radar, small multiples with -Facet, rankings over time with bump, categories around a circle with polar and progress rings with radialbar.

KPI matrix with sparklines

One small chart per row and column, one scale per column.

$kpis = foreach ($c in 'Customer A', 'Customer B', 'Customer C') {
    foreach ($k in 'Tickets', 'SLA %', 'Backup %') {
        foreach ($w in 1..10) { [pscustomobject]@{ Customer = $c; Kpi = $k; Week = "W$w"; Value = switch ($k) { 'Tickets' { 40 + 5 * $c.Length + ($w % 4) * 6 } 'SLA %' { 97 + ($w % 3) } default { 98 + ($w % 2) } } } }
    }
}
New-UDEChart -Data $kpis -Type matrix -Y Customer -GroupBy Kpi -X Week -Value Value -CellType Area -Height 300px

Many measures (parallel)

Drag along an axis to keep only the lines in that range; -OnSelect gets their rows.

$rng = [System.Random]::new(5)
$servers = 1..60 | ForEach-Object { [pscustomobject]@{ Name = 'srv-{0:00}' -f $_; Class = @('Windows', 'Linux')[$_ % 2]; Cpu = @(2, 4, 8, 16)[$rng.Next(0, 4)]; DiskPct = $rng.Next(30, 98); PatchDays = $rng.Next(0, 60) } }
New-UDEChart -Data $servers -Type parallel -X Name -GroupBy Class -Y Cpu, DiskPct, PatchDays -Height 340px -OnSelect { Show-UDToast -Message "$($EventData.count) servers" }

Radar

$teams = @(
    [pscustomobject]@{ Team = 'Service Desk'; Speed = 8; Quality = 7; Coverage = 9; Docs = 5 }
    [pscustomobject]@{ Team = 'Server'; Speed = 6; Quality = 9; Coverage = 6; Docs = 8 }
)
New-UDEChart -Data $teams -Type radar -X Team -Y Speed, Quality, Coverage, Docs -Max 10 -Height 320px

Small multiples

-Facet draws one small chart per value, all on one scale.

$rows = foreach ($d in 'Mon', 'Tue', 'Wed', 'Thu', 'Fri') { foreach ($h in 8..18) { [pscustomobject]@{ Day = $d; Hour = $h; Calls = [math]::Round(20 + 15 * [math]::Sin(($h - 8) / 3) + $d.Length) } } }
New-UDEChart -Data $rows -Type line -X Hour -Y Calls -Facet Day -FacetColumns 5 -XAxisType Category -Height 220px

Rank over time (bump)

The rank of each item per period by its value; lines cross when one overtakes another.

$months = 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov'
$ranking = foreach ($i in 0..5) { foreach ($c in 'Customer A', 'Customer B', 'Customer C', 'Customer D') { [pscustomobject]@{ Month = $months[$i]; Customer = $c; Tickets = 50 + (($i + 1) * $c.Length * 7) % 90 } } }
New-UDEChart -Data $ranking -Type bump -X Month -GroupBy Customer -Y Tickets -Height 320px

Around the clock (polar)

Categories around a circle; -Aggregate Count counts raw rows per category.

$calls = foreach ($i in 1..400) { [pscustomobject]@{ Id = $i; Hour = '{0:00}' -f [int](8 + 4 * [math]::Sin($i) + ($i % 7)) } }
New-UDEChart -Data ($calls | Sort-Object Hour) -Type polar -X Hour -Y Id -Aggregate Count -Legend None -Height 340px

Progress rings (radialbar)

One ring per category; -Max is three quarters of the circle, the names sit in the free quarter.

$compliance = @(
    [pscustomobject]@{ Customer = 'Customer A'; Compliance = 96 }
    [pscustomobject]@{ Customer = 'Customer B'; Compliance = 88 }
    [pscustomobject]@{ Customer = 'Customer D'; Compliance = 61 }
)
New-UDEChart -Data $compliance -Type radialbar -X Customer -Y Compliance -Min 0 -Max 100 -Format 'percent100:0' -Legend None -Height 300px

The value stands at the end of each ring, along the ring; on the lower half of the circle it is turned so it reads upright.