I have created a dashboard for checking the capability of a tensile machine containing a local filter, control chart, distribution and process capability plots, see image. I have also included a radio box with a list of chartable columns (ColList) so to allow the user to interactively chose the response to be charted:
Panel1 = Panel Box( "Column selector",
rb = Radio Box( ColList , width( 200 ),<BR /> 1, show( rb << Get() )
)
);
SelectVar = rb << get selected;What I want to do is get the value (SelectVar) from the radio box and use it as a variable in the other graphs. I can see how this is done using a column switcher, but I don't know how to do it using a local variable.
I've added the jmp data file and the dashboard script files.
Perfect. Please don't hesitate to come back if you get stuck or need any help with the Process Capability plots.
Thanks @HadleyMyers;, it works perfectly for the two control charts. The process capability plots don't change with the radio button, but I can work out how to do that from your script. I'll upload the final script to the cookbook once I get it working.
Hi again,
I amended the code to include the Distribution object as well. Please take a look and let me know if it helps.
Hi,
I think I've made some progress towards a possible solution. Take a look at this section of code:
Panel1 = Panel Box( "Column selector",
rb = Radio Box( ColList , width( 200 ), 1, cb1<<DELETE></DELETE>
The Control Chart Builder object is called cb1. The radiobox script deletes cb1, and then appends what is returned by the function cbfuntion. The script defining that function is below:
cbfunction=Function({col},
cb=Control Chart Builder(
Size( 918, 368 ),
Show Control Panel( 0 ),
Show Excluded Region( 0 ),
Show Limit Summaries( 0 ),
Show Capability( 0 ),
Variables( Subgroup( :Date ), Y(col) ),
Chart(
Position( 1 ),
Points( Individual Points( 1 ) ),
Limits
),
Chart( Position( 2 ) ),
SendToReport(
Dispatch(
{},
"Control Chart Builder",
FrameBox,
{DispatchSeg(
Marker Seg( 1 ),
{Marker( "Circle" )}
), DispatchSeg(
Marker Seg( 2 ),
{Color( {126, 126, 126} ),
Marker( "FilledCircle" ), Transparency( 0.8 )}
)}
),
Dispatch(
{},
"Control Chart Builder",
FrameBox( 2 ),
{DispatchSeg(
Marker Seg( 1 ),
{Marker( "Circle" )}
)}
)
)
);
Return(cb);
);
Let me know if this makes sense and if you can use it to create the required functionality.