I have a script that creates a graph builder output with a dataset that has a variable number of items in the legend and variable number of frames. I'm able to get the frame tree structure then format them but unable to format the legend. I think I'm close but something is not functional in the very last line.
Here's an example script.
Names Default To Here( 1 );
dt = Open("$SAMPLE_DATA/Solubility.jmp");
dtstack = dt << Stack(
columns(:Name( "1-Octanol" ),:Ether,:Chloroform,:Benzene,:Carbon Tetrachloride, :Hexane ),
Source Label Column( "Gas" ),
Stacked Data Column( "Solubility" )
);
gbname = dtstack << Graph Builder( Size( 668, 643 ), Show Control Panel( 0 ),
Variables( Y( :Solubility ), Wrap( :Gas ), Overlay( :Labels ) ),
Elements( Points( Y, Legend( 12 ) ) )
);
frames = gbname << xpath("//FrameBox"); //gets frames, works
frames << set background color( -16512221 ); //formats frames, works
LegendPallet = gbname << xpath("//LegendBox"); //gets legend, i think this works
LegendPallet << Color Theme( "Pastel" ); //formats color theme --doesn't work. I suspect an issue with my obj.