Hello,
I need some help in order to make a column switcher for a P' chart of Laney for events.
Below is my code:
Firstly, we need to determine a coefficient with these lines:
z_yyy = Eval( {:"Y1"n} );
z_xx = z_yyy[1] << get values;
z_nnn = Eval( {:N} );
z_nn = z_nnn[1] << get values;
z_rrr = Eval( {:Numéro de lot} );
z_Proportion = E Div( z_xx, z_nn );
z_Pbar = V Sum( z_xx ) / V Sum( z_nn );
z_sigma_est = Root( z_Pbar * (1 - z_Pbar) );
z_zvalue = E Mult( ((z_Proportion - z_Pbar) / z_sigma_est), Root( z_nn ) );
z_nr = N Row( z_zvalue );
z_mRList = {0};
z_m = z_zvalue;
z_m[1, 0] = [];
z_m = z_m |/ [0];
z_mr = Abs( z_m - z_zvalue );
z_nr = N Row( z_mr );
z_mr[z_nr, 0] = [];
z_SigmaZ = Mean( z_mr ) / 1.128;
z_KSigmaZ = 3 * z_SigmaZ;
Then, here is where I would like to develop a column switcher:
graph = New Window( chart_title,
Control Chart(
Sample Label( :Numéro de lot ),
Sample Size( :N ),
KSigma( z_KSigmaZ ),
Sort by Row Order( 1 ),
Chart Col( :"Y1"n, P( Limits Precision( 1 ), LCL( -3 ) ) ),
SendToReport(
Dispatch(
{},
"P of Y1",
OutlineBox,
{Set Title( "p'-chart, p of Y1" )}
),
Dispatch(
{"P of Y1"},
"2",
ScaleBox,
{Format( "Fixed Dec", 12, 5 ), Min( -0.00025 ), Max( 0.0025 ),
Inc( 0.00025 ), Minor Ticks( 1 )}
),
Dispatch(
{"P of Y1"},
"1",
ScaleBox,
{Min( 0.5 ), Inc( 1 ), Minor Ticks( 0 )}
),
Dispatch(
{"P of Y1"},
"",
AxisBox,
{Add Axis Label( "Taux de défauts pour Y1" )}
),
Dispatch(
{"P of Y1"},
"Proportion pour RNS",
TextEditBox,
{Set Text( "Taux de défauts pour Y1" )}
),
Column Switcher(
:Name( "Y1" ),
{:Name( "Y1" ), :Name( "Y2" ),
:Name( "Y3" ), :Name( "Y4" )}
)
)
);
);
However, this is developed with the Chart Col function and there is no Y to determine, that is why I don't know how to make this colums switcher on it.
Can you please help me with this request?
Thanks a lot,
Regards,
Sébastien