I have worked up an example of what your graph would look like. I am using a subset of a JMP sample data table.
Here is the JSL to produce the graph. from the attached data table
Names default to here(1);
dt = current data table();
Graph Builder(
Size( 899, 765 ),
Show Control Panel( 0 ),
Variables( X( :PNP1 ), Y( :NPN1 ), Group X( :SITE ), Group Y( :lot_id ) ),
Elements( Points( X, Y, Legend( 3 ) ) ),
Local Data Filter(
Add Filter(
columns( :wafer ),
Display( :wafer, N Items( 15 ), Size( 161, 255 ) )
)
)
);
:npn1<<set property("spec limits",{LSL( 104.41 ), USL( 120 ), Target( 118.15 ), Show Limits( 1 )});
I think your issue is that you have the Add Reference Lines hard coded into your Graph Builder Code. You need to be setting the "Show Limits" and the actual Spec Limits in the Column Property, and Graph Builder will pick up on the change.
Notice the last line of the script. It changes the spec limits for the column NPN1, the Y Axis column. You can change the values of the USL, LSL and Target and rerun that line, and you will see the spec limits change on the graph.
Jim