cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
Choose Language Hide Translation Bar
jan_solo
Level III

Reference lines won't show up on chart

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", "LS", 1), // shows on chart

Add Ref Line(nUSL, "Solid", "Medium Light Orange", "US", 1), // shows on chart

 

Is there any way I can actually use LSL and USL as labels?

 

Thanks,

 

Jan

3 REPLIES 3
pauldeen
Level VI

Re: Reference lines won't show up on chart

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.

gzmorgan0
Super User (Alumni)

Re: Reference lines won't show up on chart

@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.

Re: Reference lines won't show up on chart

@gzmorgan0 is correct.  You need to add the following command to your CCB code.

Show Spec Limits( 1 );

USL and LSL are the names JMP uses when you have a spec limit column property.  Some users have requested that spec limit column properties not show by default in control charts.  This is how the platform turns those off and on.  You are using the same names JMP uses so,  you will therefore need to use the above command to see them.