大家好,
我的一位用戶詢問是否可以自動更改標題框中的標籤以反映分類變數的不同值。
在提供的範例中,她希望看到「3」、「4」和「5」(或「% of Factor(3)」等),而不是到處都有相同的標籤「% of Factor」 。這樣會比較容易理解。
我知道如何手動調整標籤(透過編輯選項卡標題,如第二張圖片所示),但是有沒有辦法自動執行此過程?
期待您的真知灼見!


腳本方法可以接受嗎?如果是這樣,這裡有一種自動化的方法。只要使用者不更改軸表的預設順序,該方法就應該有效。
Names Default To Here( 1 );
//setup
dt = Open( "$SAMPLE_DATA/Tablet Production.jmp" );
gb = dt << Graph Builder(
Size( 525, 458 ),
Show Control Panel( 0 ),
Variables( X( :Lot Acceptance ), Overlay( :Screen Size ) ),
Elements(
Bar( X, Legend( 4 ), Bar Style( "Stacked" ) ),
Caption Box(
X,
Legend( 5 ),
Summary Statistic( "% of Total" ),
Location( "Axis Table" )
)
)
);
//get values for each axis row
lstScreenSize = Associative Array( :Screen Size ) << Get Keys;
//populate
For Each( {i, j}, lstScreenSize,
Report( gb ) << Dispatch( {}, "Lot Acceptance", ScaleBox,
{Label Row( j + 1, Row Title( "% of Total(" || i || ")" ) )}
)
);