嘿大家,
我正在嘗試循環處理一個生成“所選圖表”報告元素的過程篩選器腳本。我需要它靈活,因為篩選器中的回覆數量可能會隨著時間的推移而變化。所以我嘗試放入這個循環來更改圖表的軸格式,但可惜它不起作用。
SendToReport(
Dispatch( {}, "", TableBox, {Sort By Column( 2, 1 )} ),
Dispatch( {}, "Charts as Selected", OutlineBox, {Close( 1 )} ),
For( i = 1, i <= 422, i++,
Dispatch(
{"Charts as Selected"},
"1",
ScaleBox(i),
{Format( "m/d/y", 10 ), Min( 3784397666.7875 ), Max( 3787415686.74375 ), Interval( "Week" ), Inc( 1 ), Minor Ticks( 6 ),
Label Row( {Label Orientation( "Perpendicular" ), Show Major Grid( 1 )} )}
),
Dispatch( {"Charts as Selected"}, "ProcessScreening Graph As Selected", FrameBox( i ), {Frame Size( 602, 255 )} ),
)
)這是一段程式碼,顯示了我試圖循環的重複內容
SendToReport(
Dispatch( {}, "", TableBox, {Sort By Column( 2, 1 )} ),
<STRONG>Dispatch({"Charts as Selected"},
"1",
ScaleBox,
{Min( 3784397666.7875 ), Max( 3787415686.74375 ), Interval( "Week" ), Inc( 1 ), Minor Ticks( 6 ),
Label Row( {Label Orientation( "Perpendicular" ), Show Major Grid( 1 )} )}
),
Dispatch( {"Charts as Selected"}, "ProcessScreening Graph As Selected", FrameBox, {Frame Size( 602, 255 )} ),
Dispatch(
{"Charts as Selected"},
"1",
ScaleBox( 2 ),
{Min( 3784397666.7875 ), Max( 3787415686.74375 ), Interval( "Week" ), Inc( 1 ), Minor Ticks( 6 ),
Label Row( {Label Orientation( "Perpendicular" ), Show Major Grid( 1 )} )}
),</STRONG><BR /><STRONG> Dispatch( {"Charts as Selected"}, "ProcessScreening Graph As Selected", FrameBox( 2 ), {Frame Size( 602, 255 )} ),</STRONG>任何指導將不勝感激!
史蒂夫
在不知道您真正想要做什麼的情況下,我建議您在選擇完成後修改它們,方法是使用<< XPath 獲取對這些軸(比例框)的引用,然後通過向該列表發送訊息來修改該列表。
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Semiconductor Capability.jmp");
obj = dt << Process Screening(
Process Variables(Column Group("Processes")),
Grouping(:SITE),
Control Chart Type("Indiv and MR"),
Show Charts as Selected(1),
RowStates([0 1, 171 1, 245 1])
);
scs = Report(obj) << XPath("//ScaleBox");
xaxis_idx = 2::N Items(scs)::3;
scs[xaxis_idx] << Min(-100) << Max(400) << Inc(100) << Inc(100) << Minor Tics(2);
謝謝@jthi !!
效果很好。我最終添加了我的東西:
scs = Report(psobj) << XPath("//ScaleBox");
xaxis_idx = 2::N Items(cnames)::3;
scs[xaxis_idx] << Min(3784397666.7875) << Max(3787415686.74375) << Interval( "Week" ) << Inc( 1 ) << Minor Ticks( 6 )<簡單問一下,您是怎麼知道要使用 Scalebox 的?當我查看 Process Screener 的屬性時,我沒有看到 Scalebox 被呼叫。當我單擊圖表的軸時,它顯示 Axisbox。