Hi everyone,
I'm currently writing a script that, eventually, generates charts. On these charts, I add 6 reference lines. 2 of them just won't show:
vlbCharts << Append(
Control Chart Builder(
Size(800, 500), // Chart size
Show Two Shewhart Charts(0),
Show Control Panel(0),
Show Excluded Region(0),
Show Limit Summaries(0),
Show Capability(0),
Variables(Subgroup(:BatchPrefix), Y(:Value)),
Chart(
Points(Statistic("Individual")),
Limits(Sigma("Moving Range" ), Show Limits(0))
),
SendToReport(
Dispatch(
{},
"Control Chart Builder",
OutlineBox,
{Set Title(sProduct || ": " || sComponent)}
), // Chart title
Dispatch(
{},
"Value",
ScaleBox,
{Min(nMinValue), Max(nMaxValue), Inc(nTicks), Minor Ticks(0),
Add Ref Line(nLSL, "Solid", "Medium Light Orange", "LSL", 1), // Not shown
Add Ref Line(nUSL, "Solid", "Medium Light Orange", "USL", 1), // Not shown
Add Ref Line(nLCL, "Solid", "Medium Dark Red", "LCL", 1),
Add Ref Line(nUCL, "Solid", "Medium Dark Red", "UCL", 1),
Add Ref Line(nLCL_Calc, "Solid", "Dark Blue", "LCL_Calc", 1),
Add Ref Line(nUCL_Calc, "Solid", "Dark Blue", "UCL_Calc", 1)}
),
Dispatch(
{},
"graph display 1 title",
TextEditBox,
{Set Text("")}),
Dispatch(
{},
"Control Chart Builder",
FrameBox,
{DispatchSeg(Line Seg(1), {Line Color("Black")} )}
)
)
);
);
The problem is the label "LSL" and "USL". When I change these to something else (eg "US" and "LS"), the lines will be displayed:
Add Ref Line(nLSL, "Solid", "Medium Light Orange", <STRONG>"LS"</STRONG>, 1), // shows on chart
Add Ref Line(nUSL, "Solid", "Medium Light Orange", <STRONG>"US"</STRONG>, 1), // shows on chart
Is there any way I can actually use LSL and USL as labels?
Thanks,
Jan
This seems to be a bug in the control chart builder platform as it works manually but not in code. I can reproduce the issue on JMP 16 EA8 and have submitted a bug report.
@jan_solo
This is just a wild guess knowing how JMP labels reference lines. Specify your reference lines with names USL and LSL and add the message to your control chart object.
cc_obj << Show Spec Limits(1);
If that doesn't work, an alternative is shown in the JMP > Help > Scripting Index
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Reliability/GaAs Laser.jmp" );
obj = dt << Degradation(
Y( :Current ),
Time( :Hours ),
Label( :Unit ),
Set Upper Spec Limit( 7.5 ) //set the spec limits
);
obj << Show Spec Limits( 1 );
My fingers are crossed.