Jump to content
Software FX Community

Error on running a Chart with conditional attributes


DwayneLaRose

Recommended Posts

 I am try to run the following script to produce colour coded charts.

This is the script that I am using:

# HoursByTech(ITW).ps1$condition = {switch ($_.Color){   'Blue' {0;}   'Green' {1;}   'Yellow' {2;}   'Red' {3;}   }}&"GetHoursByTech(ITW).ps1" last week| out-chart -caption "Hours Worked by Tech" -Title "Hours Worked by Tech" -palette highcontrast -backcolor black -plotareacolor black  -background solid -forecolor silver -allseries_multiplecolors true  -refresh 00:30:00 -name "HoursByTech(Colour)"  -legendbox_visible false -conditionalattributes_0_color Blue -conditionalattributes_1_color Green -conditionalattributes_2_color Yellow -conditionalattributes_3_color Red -condition $condition

When I run this script, I get the attached error.

Thanks in advance!

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.

×
×
  • Create New...