PSHTML now supports charts! So, why to wait? Let us explore it using PowerShell Polaris module. Yes, now my web server is powered up a bit. I can make presentation better, all using PowerShell.
Note: Ensure to checkout the Feature_Charts branch after cloning the PSHTML repo.
A lift and shift from GitHub shown below!
Now, let me show a simple trick to plot chart for the count of files and folders in the given folder. For a demo I hard coded the path. Nothing great I did – Simply, replaced the value for $data3 and $labels variables as illustrated below!
$Data3 = @([System.IO.Directory]::GetDirectories("C:\Temp").Length , [System.IO.Directory]::GetFiles("C:\Temp").Length) $Labels = @('Folders' , 'Files')