Hi, Everyone
I trying to get my first loop work, but stuck with one issue.
It simply gets all cloumns, and loop through and plot all columns. The problem is in
test == ( y_cols[i] ) ;
My intension is test is the individual columns name, but when i debug, it seems test is a list of all columns, same as the y_cols.
So when i run the script, it plots only the first column, many times.
dt = Current Data Table();
y_cols = dt << get column names(string);
Remove From(y_cols,1,2);
nw2 = new window("My first report");
for(i=1, i <=nitems(y_cols), i++,
test == ( y_cols[i] ) ;
gb=expr(Graph Builder(
Size( 700,250 ),
Show Control Panel( 0 ),
Variables(
X( :Part id ),
Y( eval(test) ),
Overlay( :Time )
),
Elements(
Points( X, Y, Legend( 12 ) ),
Line( X, Y, Legend( 14 ), Summary Statistic( "Median" ) )
),
SendToReport(
Dispatch(
{ },
"400",
ScaleBox,
{Legend Model(
12,
Base( 0, 14, 0 ),
Base( 1, 14, 1 ),
Base( 2, 14, 2 )
)}
)
)
)
);
nw2 << append(gb);
);