Jump to content
Software FX Community

Changing chart background when falls out of threshold


pshaw
 Share

Recommended Posts

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

post-5684-13922409675631_thumb.jpg

Link to comment
Share on other sites

  • 3 weeks later...

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.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...