@Sage ,
I cannot detect which platform you are using. Here is as script that adds the last value of a smoother from the GraphBuilder platform. The key here is to save the smoother values to the data table, you can delete that new smoother values column later. It takes a few steps to find the last value, extend the x-axis and add the text.
Names Default To Here( 1 );
dt = Open( "$sample_Data/Big Class.jmp" );
gb = dt << Graph Builder(
Variables( X( :height ), Y( :weight ) ),
Elements( Points( X, Y, Legend( 1 ) ), Smoother( X, Y, Legend( 2 ) ) )
);
//get row where max X
xmax = Col Max( :height );
idx = (dt << get rows where( :height == xmax ))[1];
gbb = Report( gb )[Graph Builder Box( 1 )];
Wait( 0.5 );
//smoother is the second element, save to the data table
gbb << Update Element( 1, 1, 2, {Save Formula} );
//smoother is in the last col
lastVal = Round( Column( dt, N Col( dt ) )[idx], 2 );
// here is the tricky part, if you want to annotate this to teh right of xmax you need to extend the x axis
gb_x = gbb[GraphBuilderAxisBox( 1 )];
xaxis_inc = gb_x << get inc;
xaxis_max = gb_x << get max;
//add a half inc ?? arbitrary
gb_x << Max( xaxis_max + 0.5 * xaxis_inc );
Eval(
Eval Expr(
gbb[FrameBox( 1 )] << Add Graphics Script(
Text Font( "Arial", 10, "Bold" );
Text Color( "Red" );
Text( {Expr( xmax + 0.1 * xaxis_inc ), Expr( lastVal )}, Expr( Char( lastVal ) ) );
)
)
);