cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Instantly extract effect sizes, F-ratios, and FDR-adjusted p-values from your models with the Calculate Effects Sizes extension, available now in the JMP Marketplace!
  • New to JMP? Join us Sept. 23-24 for the Early User Edition of Discovery Summit, tailor-made for new users. Register now for free!
  • Use World Cup data to build models, explore spatial relationships, and create informative visualizations in JMP. Register. July 17, 2 pm US Eastern Time.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
txnelson
Super User

JSL statement to turn off and turn on Upper and Lower Limits in Control Chart Builder from a Make Column Switch Handler

I am working on a Community Discussion entry.  My proposed solution uses a Make Column Switch Handler to change the Control Chart Builder display from a standard XBar chart with read in Control Limits, when they are available, to a Run chart with no limits.  The issue is specifically with the turning on and off of the displaying of the control limits.  The functionality exists on the Control Panel, but I have not been able to find a method to change the display/no display programmatically after the chart has been displayed.

 

Anyone have experience with this?

Jim
1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: JSL statement to turn off and turn on Upper and Lower Limits in Control Chart Builder from a Make Column Switch Handler

Do you mean these checkboxes? 

jthi_0-1681804259202.png

 

I think you might have to go with manipulating the checkboxboxes directly. Below is fairly quick made one, can be made much better

Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Quality Control/Coating.jmp");
obj = dt << Control Chart Builder(Variables(Y(:Weight), Subgroup(:Sample)));

get_cbs = Expr(
	tbs = Report(obj) << XPath("//TextBox[contains(text(), 'Show Lower Limit') or contains(text(), 'Show Upper') or contains(text(), 'Show Center Line')]");
	mbs = tbs << parent;
	cbs = mbs << sib;
);

get_cbs;

For(i = 1, i <= N Items(cbs), i++,
	get_cbs;
	cbs[i] << Set(1,0);
);
-Jarmo

View solution in original post

2 REPLIES 2
jthi
Super User

Re: JSL statement to turn off and turn on Upper and Lower Limits in Control Chart Builder from a Make Column Switch Handler

Do you mean these checkboxes? 

jthi_0-1681804259202.png

 

I think you might have to go with manipulating the checkboxboxes directly. Below is fairly quick made one, can be made much better

Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Quality Control/Coating.jmp");
obj = dt << Control Chart Builder(Variables(Y(:Weight), Subgroup(:Sample)));

get_cbs = Expr(
	tbs = Report(obj) << XPath("//TextBox[contains(text(), 'Show Lower Limit') or contains(text(), 'Show Upper') or contains(text(), 'Show Center Line')]");
	mbs = tbs << parent;
	cbs = mbs << sib;
);

get_cbs;

For(i = 1, i <= N Items(cbs), i++,
	get_cbs;
	cbs[i] << Set(1,0);
);
-Jarmo
txnelson
Super User

Re: JSL statement to turn off and turn on Upper and Lower Limits in Control Chart Builder from a Make Column Switch Handler

Jarmo,

This is exactly what I need.

Thanks

Jim

Jim

Recommended Articles