In GraphBuilder when multiple components are added to the same graph, some components get hidden or are pushed behind others and are less visible.
Line segments below are behind the bar segments.
On the graph, there is the option to right-click > customize and re-order components using the up/down arrows and send the bar segments to the back.
I found a way to script this in JMP16 (full code below), but the same solution fails in JMP15.
Is there an equivalent solution for JMP15?
gbFB1 = report(gb)[Framebox(1)];
gbFB1 << Reorder Segs({1, 2, 5});
Thanks
Ray
Full JSL code to recreate:
dt_sampledata = New Table( "Exampe Data",
Add Rows( 24 ),
New Column( "Month",
Numeric,
"Ordinal",
Format( "Best", 12 ),
Set Values(
[202101, 202101, 202101, 202101, 202102, 202102, 202102, 202102, 202103,
202103, 202103, 202103, 202104, 202104, 202104, 202104, 202105, 202105,
202105, 202105, 202106, 202106, 202106, 202106]
)
),
New Column( "Product",
Character( 16 ),
"Nominal",
Set Values(
{"ProductA", "ProductB", "ProductC", "ProductD", "ProductA", "ProductB",
"ProductC", "ProductD", "ProductA", "ProductB", "ProductC", "ProductD",
"ProductA", "ProductB", "ProductC", "ProductD", "ProductA", "ProductB",
"ProductC", "ProductD", "ProductA", "ProductB", "ProductC", "ProductD"}
)
),
New Column( "Volume",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values(
[3869, 4964, 3188, 3109, 2623, 3447, 3179, 1038, 1781, 3195, 1621, 2034,
3231, 1390, 3187, 1998, 3280, 3570, 4443, 2150, 1638, 4083, 4242, 1186]
)
),
New Column( "Chem_A",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values(
[5, 19, 45, 36, 35, 42, 28, 46, 33, 43, 19, 5, 11, 14, 47, 21, 5, 8, 33,
32, 7, 6, 9, 33]
)
),
New Column( "Chem_B",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values(
[64, 38, 90, 41, 69, 70, 79, 75, 79, 59, 25, 71, 64, 65, 62, 51, 88, 79,
41, 47, 22, 62, 57, 38]
)
)
);
// Graph Builder
gb = dt_sampledata << Graph Builder(
Size( 1040, 562 ),
Variables(
X( :Month ),
Y( :Volume, Side( "Right" ) ),
Y( :Chem_A, Position( 1 ) ),
Y( :Chem_B, Position( 1 ) ),
Overlay( :Product )
),
Elements(
Line( X, Y( 2 ), Y( 3 ), Overlay( 0 ), Legend( 12 ) ),
Bar( X, Y( 1 ), Legend( 11 ), Bar Style( "Stacked" ) )
),
SendToReport(
Dispatch(
{},
"400",
LegendBox,
{Legend Position( {12, [4, 5], 11, [0, 1, 2, 3]} )}
)
)
);
gbFB1 = report(gb)[Framebox(1)];
gbFB1 << Reorder Segs({1, 2, 5});