我目前正在Application Builder中製作JMP應用程序。我很困惑為什麼我的圖表會在Graph Builder中自動調整,但是當我將它們拖到Application Builder中時,無論我設置什麼設置,它們都不會。我在圖形構建器中創建了5個圖表,並將它們放在分割器中的儀表板中。我希望應用程序打開時圖形自動適應窗口,以便用戶可以根據自己的喜好調整分割器,圖形也會重新調整。每當我將這些圖表中的每一個分開時,它們都會自動伸展完美。但是,當我將它們放入儀表板時,所有圖形總是默認為“保持縱橫比”:

例如,這是我的第一張圖的代碼:
Report8 = Platform(
DataTable1,
Graph Builder(
Size( 276, 205 ),
Fit To Window( "Auto" ),
Show Control Panel( 0 ),
Categorical Color Theme( "JMP Default" ),
Spacing Borders( 1 ),
Variables( X( :Priority ) ),
Elements(
Pie( X, Legend( 2 ), Label( "Label by Value" ) ),
Caption Box( X, Legend( 3 ) )
),
SendToReport(
Dispatch(
{},
"Graph Builder",
OutlineBox,
{Set Title( "Priority Pie Chart" )}
),
Dispatch(
{},
"",
NoCloneBox,
{Visibility( "Visible" )}
),
Dispatch(
{},
"graph title",
TextEditBox,
{Set Text( "Priority Distribution" )}
),
Dispatch( {}, "X title", TextEditBox, {Set Text( "" )} ),
Dispatch(
{},
"400",
LegendBox,
{Set Title( "Priority Coloring" )}
)
)
)
);
如您所見,我嘗試將“適合窗口”設置為“自動”。最初,應用程序構建器編寫了“保持縱橫比”,但我將其替換為“自動”,它仍然默認為“維持縱橫比”。
在此處初始化報表時,我還嘗試將“適合窗口”設置為“自動”:
Report8 << Fit To Window( "Auto" );
Report8 << Background Color( 2147483647 );
Report8 << Border( {Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )} );
Report8 << Enabled( 1 );
Report8 << Horizontal Alignment( "Default" );
Report8 << Margin( {Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )} );
Report8 << Padding( {Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )} );
Report8 << Text Color( 2147483647 );
Report8 << Vertical Alignment( "Default" );
Report8 << Visibility( "Visible" );
Report8 << set horizontal( 0 );
這似乎也不會影響圖形設置。有誰知道我做錯了什麼?或者它應該以這種方式工作?
如果有人對上面的非SAS員工的反應感到困惑,那是因為這這個由SAS員工創建的主題最初發佈在Discussions論壇上。我把它搬到這裡作為員工問題的更合適的地方。
你好 @BenLu ,
我認為自己對JSL非常好,並且我已經構建了很多用戶界面,但是我發現JSL中的大小調整是不直觀和令人沮喪的。 我發現,每當我嘗試使用消息來調整顯示對象的大小時,它們都無效,並且日誌中沒有任何幫助。 與自動拉伸有關的任何事情都同樣困難。 如果JMP的專家能夠通過JSL編寫關於調整大小和設置自動拉伸的非常好的技術說明,我認為這對我們很多人來說非常有幫助。