Graph Builder - Change caption box labelsHi everyone,
One of my users asked if it’s possible to automatically change the labels in the Caption Box to reflect the different values of a categorical variable.
In the example provided, she would like to see "3", "4," and "5" (or "% of Factor(3)", etc.) instead of having the same label, "% of Factor," everywhere. It would be more understandable.
I know how to adjust the labels manually (by editing the Tab Captions, as shown in the second picture), but is there a way to automate this process?
Looking forward to your insights!


Re: Graph Builder - Change caption box labelsWould a scripting approach be acceptable? If so, here's a way to automate it. The approach should work as long as the user doesn't change the ordering of the axis table from the default.
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 || ")" ) )}
)
);
Re: Graph Builder - Change caption box labelsThanks for your proposal