Pie Chart Help

Ask questions about creating Graphical User Interfaces (GUI) in PowerShell and using WinForms controls.
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 5 years and 10 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
User avatar
dank42
Posts: 61
Last visit: Tue Apr 26, 2022 7:49 am

Pie Chart Help

Post by dank42 »

Hi,

How can I populate these values into a chart?

DB Size (GB)
---------------
166

Available New Mbx Space (GB)
-------------------------------------
1

Code: Select all

$DB01 = Get-MailboxDatabase DB01 -Status | select name, @{ Name = 'DB Size (Gb)'; Expression = { $_.DatabaseSize.ToGb() } }, @{ Name = 'Available New Mbx Space Gb)'; Expression = { $_.AvailableNewMailboxSpace.ToGb() } }
I am trying to follow the below guide but not really getting anywhere
https://www.sapien.com/blog/2011/05/05/ ... owershell/

Thanks
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: Pie Chart Help

Post by jvierra »

A pie chart with one value makes no sense. What is it you are trying to chart?

If you want "percent used" first convert to two numbers. Amount used and amount free.

free = Size - used

then chart used and free as the two values.
This topic is 5 years and 10 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked