For example, the following script, I want to use
aa="height";
bb="weight";
In JSL use aa, bb to code the relevant column names.
Thanks!
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
aa = "height";
bb = "weight";
p1 = dt << Graph Builder(
Size( 765, 453 ),
Show Control Panel( 0 ),
Show Legend( 0 ),
Legend Position( "Bottom" ),
Variables( X( Transform Column( "Row", Formula( Row() ) ) ), Y( aa ), Y( bb, Position( 1 ), Side( "Right" ) ) ),
Elements( Bar( X, Y( 1 ), Legend( 5 ) ), Bar( X, Y( 2 ), Legend( 6 ) ) ),
SendToReport(
Dispatch( {}, "Row", ScaleBox, {Min( 0 ), Max( 41.4241978609626 ), Inc( 10 ), Minor Ticks( 1 )} ),
Dispatch( {}, aa, ScaleBox, {Min( 1 ), Max( 75.46 ), Inc( 10 ), Minor Ticks( 0 )} ),
Dispatch( {}, bb, ScaleBox, {Min( 1 ), Max( 185.416 ), Inc( 50 ), Minor Ticks( 1 )} ),
Dispatch(
{},
"400",
ScaleBox,
{Legend Model( 5, Properties( 0, {Fill Color( 36 )}, Item ID( aa, 1 ) ) ), Legend Model(
6,
Properties( 0, {Fill Color( 67 )}, Item ID( bb, 1 ) )
)}
),
Dispatch( {}, "graph title", TextEditBox, {Set Text( "test" )} ),
Dispatch( {}, "X title", TextEditBox, {Hide( 1 )} ),
Dispatch( {}, "Y title", TextEditBox, {Set Text( aa || "999" )} ),
Dispatch( {}, "Y r title", TextEditBox, {Set Text( bb || "999" )} )
)
);