DwayneLaRose Posted October 12, 2010 Report Posted October 12, 2010 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! Quote
DwayneLaRose Posted October 19, 2010 Author Report Posted October 19, 2010 I appears that the code that I used was correct. It is working now. Quote
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.