I think you have to do this through legend server (or when building the graph builder expression)
Names Default To Here(1);
dt = open("$SAMPLE_DATA/Big Class.jmp");
gb = dt << Graph Builder(
Transform Column("Row", Formula(Row())),
Variables(X(:Row), Y(:height)),
Elements(Line Of Fit(X, Y, Legend(5), Confidence of Fit(0))),
SendToReport(
Dispatch({}, "400", ScaleBox,
{Legend Model(
5,
Properties(
0,
{Line Label Properties({Name Label(1)})},
Item ID("height", 1)
)
)}
)
)
);
gb << Add Variable({:weight, Role("Y"), Position(1)});
server = gb << Get Legend Server;
items = server << Get Legend Items;
For(i = 1, i <= N Items(items[1]), i++,
items[1][i] << Set Properties(
{Line Label Properties({Name Label(1)})}
)
);
-Jarmo