Does anyone know of a way to add subtitles to control charts via scripting? I would have a column of subtitle names, and would like to loop through that and add row 1 as the subtitle for column 2, row 2 the subtitle for column 3.. ect
Any tips/knowledge if this is possible would be great! Thanks!
Not sure if you can set subtitles to Control Chart (Builder), so you might have to create copy of the text edit box which is used as title and then append it with new text box.
Below is one example
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Quality Control/Coating.jmp");
new_col = dt << New Column("subtitles", Character, Nominal);
new_col[1] = "text1";
new_col[2] = "text2";
nw = New Window("",
vlb = V List Box()
);
nw << Show Window(0);
cols_of_interest = {"Weight", "Weight 2"};
subtitles = :subtitles << get values;
For Each({col_of_interest, idx}, cols_of_interest,
vlb << append(obj = dt << Control Chart Builder(Variables(Y(:Weight), Subgroup(:Sample))));
title_teb = (Report(obj)[TextEditBox(1)]);
gb_titlebox = title_teb << parent;
gb_titlebox << Append(V List Box(align("center"),
title_teb << Clone box(),
Text Box(dt[idx, "subtitles"])
));
title_teb << Delete Box();
wait(0);
);
nw << Show Window(1);