Wenn in GraphBuilder mehrere Komponenten zum selben Diagramm hinzugefügt werden, werden einige Komponenten ausgeblendet oder hinter andere verschoben und sind weniger sichtbar.
Die darunter liegenden Liniensegmente befinden sich hinter den Balkensegmenten.

In der Grafik besteht die Möglichkeit, mit der rechten Maustaste> Komponenten mit den Aufwärts- / Abwärtspfeilen anzupassen und neu zu ordnen und die Balkensegmente nach hinten zu senden.


Ich habe eine Möglichkeit gefunden, dies in JMP16 (vollständiger Code unten) zu skripten, aber dieselbe Lösung schlägt in JMP15 fehl.
Gibt es eine äquivalente Lösung für JMP15?
gbFB1 = report(gb)[Framebox(1)];
gbFB1 << Reorder Segs({1, 2, 5});
Vielen Dank
Strahl
Vollständiger JSL-Code zum erneuten Erstellen:
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]} )}
)
)
);<BR />gbFB1 = report(gb)[Framebox(1)];<BR /><BR />gbFB1 << Reorder Segs({1, 2, 5});<BR />
In der JSL-Darstellung von Graph Builder scheint die Reihenfolge der "Segmente" durch die Reihenfolge festgelegt zu sein, in der sie in der angezeigt werden Elemente () Streit.
Hier ist eine Idee, wie Sie die Elemente mit JSL in JMP15 neu anordnen können. Es wird davon ausgegangen, dass Ihre dt_sampledata die aktuelle Datentabelle ist.
// Graph Builder
gb = 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" ) )
)
);
Wait( 2 );
gbexpr = gb << get script;
// Find the position of the Elements() argument
i = 1;
While( Head( Arg( gbexpr, i ) ) != Expr( Elements ), i++ );
// Move forward the most background element to front
n = N Arg( Arg( gbexpr, i ) );
reordered_elem = Eval Expr( Elements( Expr( Arg( gbexpr, {i, n} ) ), Expr( Arg( gbexpr, {i, 1} ) ) ) );
// Replace old Elements() with the new re-ordered elements
Substitute Into( gbexpr, Arg( gbexpr, i ), Name Expr( reordered_elem ) );
// Replace the graph builder
gb << close window;
Eval( gbexpr );