My Nivo Chart will not load or display my dataset. The example Nivo dataset and code works in my system and displays as expected.
I’ve sanitized my production data set with non-production data. Please see my results below along with code that reproduces my problem. Is there something wrong with my data, or is there something wrong with the Nivo integration?
I’ve been trying to fix this for days. Any help is appreciated.
Code to reproduce:
New-UDApp -Title 'Non Production Data Playground' -Content {
$NivoData = '[ { "Microsoft Windows Server 2016 Datacenter": 5, "Microsoft Windows Server 2022 Datacenter": 5, "CentOS Linux 7": 5, "Microsoft Windows Server 2019 Datacenter": 5, "support": "Supported", "Debian Linux 11": 5, "Microsoft Windows Server 2019 Standard": 5, "Microsoft Windows Server 2022 Standard": 5, "Microsoft Windows Server 2016 Standard": 5, "RedHat Linux 8": 5, "Microsoft Windows Server 2012 R2 Standard": 5, "Microsoft Windows Server 2008 R2 Standard": 5, "Microsoft Windows Server 2008 R2 Enterprise": 5, "Linux Based": 5, "Unknown OS": 5, "DSM": 5, "Microsoft Windows Server 2012 R2 Datacenter": 5, "VMware ESXi": 5, "Ubuntu Linux Server": 5, "Synology DSM": 5, "Microsoft Windows Server 2008 Standard": 5, "Synology DFS": 5, "Microsoft Windows Server 2003": 5, "QNAP QTS": 5, "Windows Server 2008": 5 }, { "Microsoft Windows Server 2012 R2 Standard": 5, "Microsoft Windows Server 2012 R2 Datacenter": 5, "Microsoft Windows Server 2008 R2 Enterprise": 5, "Microsoft Windows Server 2008 R2 Standard": 5, "support": "Not Supported", "Microsoft Windows Server 2008 Standard": 5, "Microsoft Windows Server 2003": 5, "Microsoft Windows Server 2019 Standard": 5, "Microsoft Windows Server 2016 Standard": 5, "Linux Based": 5, "Unknown OS": 5, "DSM": 5, "CentOS Linux 7": 5, "Debian Linux 11": 5, "VMware ESXi": 5, "RedHat Linux 8": 5, "Ubuntu Linux Server": 5, "Microsoft Windows Server 2019 Datacenter": 5, "Microsoft Windows Server 2022 Datacenter": 5, "Microsoft Windows Server 2022 Standard": 5, "Microsoft Windows Server 2016 Datacenter": 5, "Synology DSM": 5, "Synology DFS": 5, "QNAP QTS": 5, "Windows Server 2008": 5 }, { "DSM": 5, "VMware ESXi": 5, "Synology DFS": 5, "Unknown OS": 5, "support": "Unknown", "Ubuntu Linux Server": 5, "Synology DSM": 5, "Linux Based": 5, "QNAP QTS": 5, "Windows Server 2008": 5, "Microsoft Windows Server 2019 Standard": 5, "Microsoft Windows Server 2012 R2 Standard": 5, "Microsoft Windows Server 2016 Standard": 5, "Microsoft Windows Server 2008 R2 Standard": 5, "Microsoft Windows Server 2008 R2 Enterprise": 5, "CentOS Linux 7": 5, "Debian Linux 11": 5, "Microsoft Windows Server 2012 R2 Datacenter": 5, "RedHat Linux 8": 5, "Microsoft Windows Server 2019 Datacenter": 5, "Microsoft Windows Server 2022 Datacenter": 5, "Microsoft Windows Server 2022 Standard": 5, "Microsoft Windows Server 2016 Datacenter": 5, "Microsoft Windows Server 2008 Standard": 5, "Microsoft Windows Server 2003": 5 } ]' | ConvertFrom-Json
$NivoOSNameArray = '[ "Microsoft Windows Server 2019 Standard", "Microsoft Windows Server 2012 R2 Standard", "Microsoft Windows Server 2016 Standard", "Microsoft Windows Server 2008 R2 Standard", "Microsoft Windows Server 2008 R2 Enterprise", "Linux Based", "Unknown OS", "DSM", "CentOS Linux 7", "Debian Linux 11", "Microsoft Windows Server 2012 R2 Datacenter", "VMware ESXi", "RedHat Linux 8", "Ubuntu Linux Server", "Microsoft Windows Server 2019 Datacenter", "Microsoft Windows Server 2022 Datacenter", "Microsoft Windows Server 2022 Standard", "Microsoft Windows Server 2016 Datacenter", "Synology DSM", "Microsoft Windows Server 2008 Standard", "Synology DFS", "Microsoft Windows Server 2003", "QNAP QTS", "Windows Server 2008" ]' | ConvertFrom-Json
New-UDCard -Content{
New-UDTypography -Text "Nivo Data = $($NivoData | ConvertTo-Json)"
}
New-UDCard -Content{
New-UDTypography -Text "Nivo Keys = $($NivoOSNameArray | ConvertTo-Json)"
}
New-UDNivoChart -Bar -Data $NivoData -Height 400 -Width 900 -Keys $NivoOSNameArray -IndexBy 'support'
}
Product: PowerShell Universal
Version: 4.2.4