Hi,
I want to highlight data points <= the limit values, 98% in this case, but something doesn't seem to work. I'm not sure where I'm making the error.
Here is my jsl code:
Names Default To Here( 1 );
dt2 = Current Data Table();
dt2 << begin data update;
fairows = dt2 << get rows where( As Column( "1" ) <= 0.98 );
dt2 << end data update;
vc1 = dt2 << Control Chart Builder(
Size( 890, 273 ),
Show Two Shewhart Charts( 0 ),
Test Excluded Subgroups( 0 ),
Include Missing Categories( 0 ),
Show Excluded Region( 0 ),
Show Limit Summaries( 0 ),
Variables( Subgroup( :Date ), Y( :"1"n ) ),
Chart(
Points( Statistic( "Individual" ) ),
Limits( Sigma( "Moving Range" ), Show Center Line( 0 ), Show Lower Limit( 0 ), Show Upper Limit( 0 ) )
),
Show Control Panel( 0 ),
SendToReport(
Dispatch( {}, "Control Chart Builder", OutlineBox, {Set Title( "1" )} ),
Dispatch( {}, "Date", ScaleBox, {Label Row( {Label Orientation( "Angled" ), Set Font Size( 8 )} )} ),
Dispatch(
{},
"1",
ScaleBox,
{Add Ref Line( 0.928901607373389, "Dotted", "Medium Light Magenta", "Suggested (92.89%)", 3 ),
Add Ref Line( 0.897380548253792, "Solid", "Orange", "4.5 sigma(89.74%)", 2 ), Add Ref Line(
0.865859489134196, "Solid", "Medium Dark Green", "6 sigma(86.59%)", 2
), Add Ref Line( 0.9, "Dense Dash", "Medium Dark Red", "90.00%", 3 )}
),
Dispatch( {}, "graph display 1 title", TextEditBox, {Set Text( "" )} ),
Dispatch( {}, "Subgroup display 1 title", TextEditBox, {Set Text( "" ), Set Font Size( 10 ), Set Font Style( "Bold" )} ),
Dispatch( {}, "Y display 1 title", TextEditBox, {Set Text( "" )} ),
Dispatch( {}, "Control Chart Builder", FrameBox, {Background Color( -15658734 ), Marker Size( 2 ), Marker Drawing Mode( "Outlined" )} )
)
);
//Highlight data points < 98%
Eval(
Eval Expr(
Report( vc1 )[Framebox( 1 )] << add graphics script(
Marker(
Marker Size( 10 );
Color State( "red" );,
Expr( :"1"n[fairows] ),
Expr( :Date[fairows] )
)
)
)
);