cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Have your say in shaping JMP's future by participating in the new JMP Wish List Prioritization Survey
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