I have been able to modify your code to display the data as a smoother and the 1st and 2nd Important times as reference lines.
The JSL uses a Make Row State Handler to determine the Local Data Filter has changed, and then finds the correct 1st and 2nd Important Time data, removes the old reference lines, and then adds the new reference lines.
Names Default To Here( 1 );
dt = Current Data Table();
New Window( "filter test",
Data Filter Context Box(
H List Box(
dt << Data Filter(
Local,
Add Filter(
columns( :ProcessID ),
Where( :ProcessID == "\!"0A84CE32-1054-494B-B89C-1F4780E1F760\!"" ),
Display( :ProcessID, N Items( 15 ), Find( Set Text( "" ) ) )
)
),
V List Box(
//t = Text Box( "0 Rows Excluded" ),
t = gb = Graph Builder(
Size( 483, 600 ),
Variables(
X( :"Time Adjusted (s)"n ),
Y( :"Ram Travel Corrected (mm)"n ),
Y( :Other Factor, Position( 1 ), Side( "Right" ) )
),
Elements( Smoother( X, Y( 1 ), Legend( 8 ) ), Smoother( X, Y( 2 ), Legend( 9 ) ) ),
Dispatch(
{},
"400",
ScaleBox,
{Legend Model(
8,
Properties( 0, {Line Width( 4 )}, Item ID( "Smooth(Ram Travel Corrected (mm))", 1 ) )
), Legend Model( 9, Properties( 0, {Line Width( 4 )}, Item ID( "Smooth(Other Factor)", 1 ) ) )}
)
)
)
)
)
);
updatetext = Function( {},
rs = t << Get Row States();
n = 0;
For( ii = 1, ii <= N Rows( rs ), ii++,
If( Excluded( As Row State( rs[ii] ) ),
n++,
Break();
)
);
If( ii != preRefLine,
Try( Report( gb )[AxisBox( 1 )] << Remove Ref Line( dt:"1st Important Time (s)"n[preRefLine] ) );
Try( Report( gb )[AxisBox( 1 )] << Remove Ref Line( dt:"2nd Important Time (s)"n[preRefLine] ) );
Report( gb )[AxisBox( 1 )] << Add Ref Line( dt:"1st Important Time (s)"n[ii], "Solid", "Orange", "", 4 );
Report( gb )[AxisBox( 1 )] << Add Ref Line( dt:"2nd Important Time (s)"n[ii], "Solid", "Green", "", 4 );
preRefLine = ii;
);
);
rsupdate = Function( {a},
If( Is Matrix( a ),
updatetext()
)
);
rsh = t << Make Row State Handler( dt, rsupdate );
updatetext();
Jim