Here is a simple example that draws the graph and then resets the X label to the name of the 2nd column in the data table.
names default to here(1);
dt=open("$SAMPLE_DATA/big class.jmp");
Graph Builder(
Size( 528, 456 ),
Show Control Panel( 0 ),
Variables( X( :weight ), Y( :height ) ),
Elements( Points( X, Y, Legend( 6 ) ), Smoother( X, Y, Legend( 7 ) ) )
);
current report()[texteditbox(3)]<<set text(column(dt,2)<<get name);

Jim