pshaw Posted June 1, 2009 Report Share Posted June 1, 2009 I'm a newb, and i'm trying to set the background color of a chart so that it changes if the value being graphed falls out of baseline #--file foo.ps1 $backcolor = 'Orange' $obj = new-object System.Object add-member -inputobject $obj -membertype NoteProperty -Name backcolor -value $backcolor $obj #--file launch.ps1 .\foo.ps1 | out-chart -values currentvalue -template foochart -PlotAreaColor {$_.backcolor} It's throwing a WARNING: $_backcolor is not a valid value for Int32 when run .\launch.ps1 Thanks, -Phil Quote Link to comment Share on other sites More sharing options...
marco.shaw Posted June 19, 2009 Report Share Posted June 19, 2009 I don't have the CHM help file handy, but that seems to be indicating that -PlotAreaColor is expecting a numeric value, but you're trying to pass it a string of alpabetical characters. One way to confirm what kind of value that parameter is execting is to do this: PS>help out-chart -full Look through that output for the -PlotAreaColor details. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.