PowerShell Console Graphing Revised

Many of you have been having fun with my PowerShell Console Graphing tool I posted the other day. But I felt the need to make one more major tweak. I wanted to have the option for conditional formatting. That is, display graphed entries with high values in one color, medium in another and low in yet another.

The default behavior is still to use a single color. But using ParameterSets I added some new parameters, -HighColor, -MediumColor and -LowColor. They are all mandatory so if you use one parameter you have to define them all.

I also moved the Property parameter and made it positional which should make it easier to use. The conditional coloring works basically by taking the largest possible graph value, which is based on available screen width and dividing it into thirds. The top third is considered high, second third is medium and last third is low.

When it comes time to graph, I check which parameter set we’re using and set the graph color accordingly.

But now I can run a command like this:


What do you think? Download Out-ConsoleGraph-v2.

UPDATE: A newer version is available at http://jdhitsolutions.com/blog/2013/12/updated-console-graphing-in-powershell/

One Reply to “PowerShell Console Graphing Revised”

  1. I made a slight change based on feedback from Lee Holmes. If you pipe a collection of objects that don’t share the same property, this will fail. The download link has been updated to load version 1.2 of the function.

Comments are closed.