I'm trying to determine RFT of parts based on the value against spec limits. I've been able to create custom transform columns in the graph builder using the following JSL script:
vars = expr(Variables()); dataSheet = "....CENSORED.jmp"; dt = Open(dataSheet); colnames = dt << get column group( "Data" ); For( i = 1, i <= nitems(colnames), i++, colName = Char(colnames[i]); insert into(vars, eval expr( X( Transform Column( expr(char(colName)), Character, Nominal, Formula( lsl = (expr(parse(colName)) << get property( "Spec Limits" ))["LSL"]; usl = (expr(parse(colName)) << get property( "Spec Limits" ))["USL"]; If( expr(parse(colName)) < lsl | expr(parse(colName)) > usl, "Bad", "Good" ); ) ) ) ) ); ); gb = Eval Expr( Graph Builder( Show Control Panel( 1 ), Expr( Name Expr( vars ) ) ) ); for(j = 1, j <= nitems(colNames), j++, insert into(gb, eval expr( Elements( Position( expr(j), 1 ), Bar( X, Legend( 3 ), Bar Style( "Stacked" ), Summary Statistic( "% of Total" ) ) ) ) ); ); gb;
This produces a virtual column for each column in the table with "Good" or "Bad" depending whether that feature was outside the spec limits. The problem is when I plot this using the Bar Chart I can't get the columns to stack:
What I'd like to see is something like this:
I can't see a way of doing this without losing connection to the original data table (ie, creating a summary style table that calculates the good/bad percentage separately)!
You need to get your data into the correct format. I'm guessing you want a separate bar for FT1 and FT2, right? You need to stack those columns (Tables > Stack). Almost everything in JMP needs to be in long format. I started with your table from the screen shot and produced this: