universal-dashboard-documentation icon indicating copy to clipboard operation
universal-dashboard-documentation copied to clipboard

Stacked Bar Charts example needs revision

Open Guacamolean opened this issue 6 years ago • 0 comments

Unless I am doing something wrong on my end, I don't think the current stacked bar chart example would work as intended. As it is, it will add the free space on top of the total size, causing the chart to extend passed what your total drive size would be.

https://github.com/ironmansoftware/universal-dashboard-documentation/blob/master/components/data-visualizations/charts.md

Perhaps altering the example to include the Used space instead of total size could clear it up. Size = [Math]::Round($_.Size / 1GB, 2); to Used = [Math]::Round(($_.size - $_.FreeSpace) / 1GB, 2)

Then New-UdChartDataset -DataProperty "Size" -Label "Size" -BackgroundColor "#80962F23" -HoverBackgroundColor "#80962F23" to New-UdChartDataset -DataProperty "Used" -Label "Used" -BackgroundColor "#80962F23" -HoverBackgroundColor "#80962F23"

Guacamolean avatar Oct 22 '19 16:10 Guacamolean