I use these lines of code in my script (in a draft state):
dt << Control Chart Builder(
Size( 534, 464 ),
Show Two Shewhart Charts( 0 ),
Show Control Panel( 0 ),
Show Capability( 1 ),
Variables(
Subgroup( :column(Sample) ),
Y( :column(Variable) ),
Phase( :column(Period) )
),
Chart(
Points( Statistic( "Individual" ) ),
Add Spec Limits( {LSL( LSL_def ), USL( USL_def )} ),
Set Control Limits( {LCL( LCL_def ), UCL( UCL_def ), Avg( Avg )} ),
Warnings( Test 1( 1 ), Test 2( 1 ), Test 3( 1 ) )
),
SendToReport(
Dispatch(
{},
CQA,
ScaleBox,
{Min( Min(LCL_def, LSL_def)-1 ), Max( Max(UCL_def, USL_def)+1 ), Inc( 1 ), Minor Ticks( 0 ),
Add Ref Line( LSL_def, "Solid", "Blue", "LSL="||char(LSL_def), 2 ),
Add Ref Line( USL_def, "Solid", "Blue", "USL="||char(USL_def), 2 ),
Add Ref Line( LCL_def, "Solid", "Red", "LCL="||char(LCL_def), 1 ),
Add Ref Line( UCL_def, "Solid", "Red", "UCL="||char(UCL_def), 1 ),
Add Ref Line( Avg, "", "Green", "UCL="||char(Avg), 1 )
}
),
Dispatch(
{},
"Control Chart Builder",
FrameBox,
{DispatchSeg(
TextSeg( 3 ),
{Line Color( "None" ), Fill Color( "None" )}
), DispatchSeg(
TextSeg( 4 ),
{Line Color( "None" ), Fill Color( "None" )}
)}
)
)
);
Thank you very much!
Jean