Names Default To Here( 1 );
Summarize( unique_groups = by( :Group ), unique_CVs = by( :Measurement %CV ) );
CVs_list = As List( unique_groups[2] );
delvals = {"."};
For( i = 1, i <= N Items( delvals ), i++,
Remove From( CVs_list, As List( Loc( CVs_list, delvals[i] ) ) )
);
gb = Graph Builder(
Show Control Panel( 0 ),
Legend Position( "Right" ),
Variables(
X( :Number ),
Y( :Measurement ),
Y( :Upper Limit, Position( 1 ) ),
Y( :Lower Limit, Position( 1 ) ),
Page( :Group ),
Color( :Final Status )
),
Elements(
Points( X, Y( 1 ), Legend( 1 ) ),
Line( Y( 2 ), Y( 3 ), Legend( 2 ) )
),
Local Data Filter( Close Outline( 1 ) ),
SendToReport(
Dispatch(
{},
"400",
ScaleBox,
{Legend Model(
1,
Base( 0, 0, 0, Item ID( "Pass", 1 ) ),
Base( 1, 0, 0, Item ID( "Fail 1", 1 ) ),
Base( 2, 0, 0, Item ID( "Fail 2", 1 ) ),
Base( 2, 0, 0, Item ID( "Fail 3", 1 ) ),
Properties( 0, {Line Color( 4 )}, Item ID( "Pass", 1 ) ),
Properties( 1, {Line Color( -128 )}, Item ID( "Fail 1", 1 ) ),
Properties( 2, {Line Color( -6266528 )}, Item ID( "Fail 2", 1 ) ),
Properties( 2, {Line Color( 3 )}, Item ID( "Fail 3", 1 ) )
), Legend Model(
2,
Properties( 0, {Line Color( 3 ), Line Style( "Dashed" ), Line Width( 1 )}, Item ID( "Pass", 1 ) ),
Properties( 1, {Line Color( 3 ), Line Style( "Dashed" ), Line Width( 1 )}, Item ID( "Fail 1", 1 ) ),
Properties( 2, {Line Color( 3 ), Line Style( "Dashed" ), Line Width( 1 )}, Item ID( "Fail 2", 1 ) ),
Properties( 2, {Line Color( 3 ), Line Style( "Dashed" ), Line Width( 1 )}, Item ID( "Fail 3", 1 ) )
)}
),
Dispatch( {}, "400", LegendBox, {Legend Position( {1, [0, 1, 2], 2, [-1, -1, -1]} )} )
)
);
Count_1 = N Items( gb << xpath( "//FrameBox" ) );
For( i = 1, i <= (Count_1), i++,
cur_val = CVs_list[i];
Eval(EvalExpr(
gb << SendToReport(
Dispatch( {}, "Graph Builder", FrameBox( i ), {Reference Line Order( 3 )} ),
Dispatch(
{},
"Measurement",
ScaleBox( i + 1 ),
{Format( "Fixed Dec", 12, 2 ), Min( 0 ), Max( 0.36 ), Inc( 0.02 ), Minor Ticks( 0 )}),
Dispatch( {}, "Y title", Text Edit Box( i - 1 ), {Set Text( "Measurement" )} ),
Dispatch( {}, "Graph Builder", FrameBox( i ), Reorder Segs( {2, 3, 4, 5, 6, 8, 1, 6} ) ),
Dispatch(
{},
"Graph Builder",
FrameBox( i ),
{Add Graphics Script(
Text Color( "Red" );
Text Font( "Segoe UI", 10, "Regular" );
Text( Center Justified, {2000, 0.04}, "%CV: " || Expr(cur_val) );
)}
)
)
));
);
(Report( gb ) << xpath( "//FrameBox" )) << Frame Size( 900, 500 );
Report( gb )[GraphBuilderTitleBox( 1 )] << Set Text( "Measurement vs. Number" );