I am currently making a JMP Application in Application Builder. I'm confused why my graphs automatically adjust in Graph Builder, but when I drag them into Application Builder they don't no matter what settings I set. I have made 5 graphs all within graph builder and put them in the dashboard held in splitters. I want the graphs to automatically Fit to Window whenever the application opens so that a user can adjust the splitters to their liking and the graphs will readjust as well. Whenever I have each of these graphs separate they auto--stretch perfectly fine. However when I put them into the dashboard all of the graphs ALWAYS default to "Maintain Aspect Ratio" :

For Example here is my code for my first graph:
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" )}
)
)
)
);
As you can see I tried setting the Fit to Window to "Auto". Initially, application builder had "Maintain Aspect Ratio" written, but I replaced it with "Auto" and it still defaults to "Maintain Aspect Ratio".
I have also tried to set the Fit to Window to "Auto" when the report is initialized here:
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 );
This also does not seem to affect the graph settings. Does anyone know if I am doing something wrong? or is it supposed to work this way?
In case anyone is confused by the response from a non-SAS employee above, it's because this this thread, started by a SAS employee, was originally posted to the Discussions forum. I've moved it here as the more appropriate place for questions from employees.
Hi @BenLu,
I would consider myself to be a pretty good with JSL, and I have built a lot of user interfaces, but I find the sizing stuff in JSL to be non-intuitive and frustrating. I have found that any time I've tried to use messages to resize a display object, they are not effective and there's nothing helpful in the log. Anything to do with auto-stretching has been similarly difficult. If there's an expert at JMP who could write a really good technical note on resizing and setting auto-stretching through JSL, I think it would be super helpful to many of us.