Grafico a barre in pila del generatore di graficiJMP 17 In allegato è presente una semplice tabella di dati contenente i numeri mensili del numero totale di parti, dei guasti totali, della percentuale dei guasti totali e quindi dei singoli numeri per i quali il parametro non è riuscito. Il grafico a barre in pila che desidero è Mese sull'asse X e% Totale errori sull'asse Y. Quindi vorrei che quelle barre fossero impilate con il breakout di cui il parametro non è riuscito in base alla percentuale mensile di ciascun parametro. Di seguito è riportata una schermata, vedere Fig 1, di qualcosa che ho redatto in ppt. Non sono riuscito a ottenerlo nel Graph Builder. Ho provato ad impilare i dati, manipolando le colonne ma non ci sono riuscito.
In sintesi, voglio che la percentuale totale complessiva delle parti guastate sull'asse Y sia sotto forma di barra, quindi quella barra mostra la percentuale di ciascun parametro non riuscito per ogni mese. La tabella dei dati di esempio è allegata di seguito. Grazie.
Fig. 1

Esplorazione e visualizzazione dei datifinestreRi: Grafico a barre in pila del generatore di graficiJim:
Grazie per la vostra risposta. Non ero a conoscenza dell'opzione Stack di serie multiple, quindi è un ottimo consiglio. L'unico problema con il grafico che hai generato era l'asse Y. Stavo cercando la percentuale totale per mese come altezza complessiva della barra. Quindi per gennaio sarebbe il 10%, febbraio il 4% e marzo il 15%. L'asse Y rappresenterebbe la percentuale complessiva mensile di fallimenti. Quindi ciascuna di queste barre verrebbe suddivisa nelle percentuali dei parametri non riusciti. La barra complessiva del 10% di gennaio verrebbe suddivisa in 20% Parm 1 / 80% Parm 2. La barra complessiva del 4% di febbraio sarebbe suddivisa in 16,7% Parm 1 / 50% Parm 2 / 33,3% Parm 3. Quindi la barra complessiva del 15% di marzo verrebbe suddivisa 37% Parm 1 / 29,6% Parm 2 / 33,3% Parm 3. Potrei aver bisogno di modificare ulteriormente la tabella perché non riesco ancora a farlo tramite il Costruttore di grafici. Grazie ancora.
Ri: Grafico a barre in pila del generatore di graficiIl grafico desiderato richiede una modifica nella struttura della tabella dati e l'impostazione di alcuni stati riga e stati colonna della tabella dati.

Lo script seguente modifica la struttura della tabella dati e quindi disegna il grafico finale sopra.Tutto nello script può essere fatto in modo interattivo.In effetti, tutto è stato fatto in modo interattivo e quindi ho semplicemente preso lo script fornito da JMP e l'ho copiato in uno script finale.
Names Default to here(1);
dt = current data table();
dtStack = dt <<
Stack(
columns(
:Parm 1 # Fails, :Parm 2 # Fails, :Parm 3 # Fails, :Parm 1 % Fail,
:Parm 2 % Fail, :Parm 3 % Fail
),
Source Label Column( "Parameter" ),
Stacked Data Column( "Counts" ),
Number of Series( 2 ),
Contiguous
);
// Change the name of the column that has the % values
dtStack:Counts 2 << set name("Percent");
// Divide each row value for the percent column to conform
// to the percent values for a JMP column
for each row(
:Percent = :Percent / 100;
);
// Change the display format for the percent column to
// display a % sign in the values
dtStack:Percent << format("Percent", 7, 0);
// A column needs to be set to have the correct display values for
// the legend. Also, the alphabetical ordering will determine the
// order of the subbar values. So recode the column to meet those
// specifications
// Recode column: Parameter
Local( {dt},
dt = dtStack;
dt << Begin Data Update;
dt << Recode Column(
dt:Parameter,
{Map Value(
_rcOrig,
{"Parm 1 # Fails", "3. Parm 1", "Parm 2 # Fails", "2. Parm 2",
"Parm 3 # Fails", "1. Parm 3"},
Unmatched( _rcNow )
)},
Update Properties( 1 ),
Target Column( :Parameter )
);
dt << End Data Update;
);
// Label column: Percent to be used to label the graph
dtStack:Percent << Label( 1 );
// Label all rows to show which values from the percent column
// to label
dtStack << Select All Rows << Label(1);
dtStack << clear selection;
dtStack << invert row selection;
// Draw the graph
Graph Builder(
Size( 528, 450 ),
Show Control Panel( 0 ),
Variables( X( :Month ), Y( :Counts ), Overlay( :Parameter ) ),
Elements(
Bar( X, Y, Legend( 7 ), Bar Style( "Stacked" ), Label( "Label by Row" ) )
),
SendToReport(
Dispatch(
{},
"400",
ScaleBox,
{Legend Model(
7,
Properties(
0,
{Fill Color( 73 )},
Item ID( "1. Parm 3", 1 )
),
Properties(
1,
{Fill Color( 25 )},
Item ID( "2. Parm 2", 1 )
),
Properties(
2,
{Fill Color( -7183127 )},
Item ID( "3. Parm 1", 1 )
)
)}
)
)
);
Ecco la tabella dati ristrutturata utilizzata per creare il grafico finale.

Ri: Grafico a barre in pila del generatore di graficiJim:
Finalmente ho qualcosa su cui lavorare tramite Graph Builder. Grazie per la soluzione che hai fornito. Le serie multiple che hai indicato sono di grande aiuto per il futuro, così come il codice per questo esercizio. Grazie ancora.
Ri: Grafico a barre in pila del generatore di graficiPassare alla percentuale del totale è una semplice formula matematica, fornire le colonne nella tabella dei dati in pila.Ho appena aggiunto una nuova colonna denominata % del totale e l'ho utilizzata nel grafico come asse Y

Names Default To Here( 1 );
dt = Current Data Table();
dtStack = dt << Stack(
columns(
:Parm 1 # Fails, :Parm 2 # Fails, :Parm 3 # Fails, :Parm 1 % Fail,
:Parm 2 % Fail, :Parm 3 % Fail
),
Source Label Column( "Parameter" ),
Stacked Data Column( "Counts" ),
Number of Series( 2 ),
Contiguous
);
// Change the name of the column that has the % values
dtStack:Counts 2 << set name( "Percent" );
dtStack << New Column( "% of Total", Format( "Percent", 7, 0 ) );
// Divide each row value for the percent column to conform
// to the percent values for a JMP column
For Each Row(
:Percent = :Percent / 100;
:"% of Total"n = :counts / :Total Fails * (:total % Fail / 100);
);
// Change the display format for the percent column to
// display a % sign in the values
dtStack:Percent << Format( "Percent", 7, 1 );
// A column needs to be set to have the correct display values for
// the legend. Also, the alphabetical ordering will determine the
// order of the subbar values. So recode the column to meet those
// specifications
// Recode column: Parameter
Local( {dt},
dt = dtStack;
dt << Begin Data Update;
dt << Recode Column(
dt:Parameter,
{Map Value(
_rcOrig,
{"Parm 1 # Fails", "3. Parm 1", "Parm 2 # Fails", "2. Parm 2",
"Parm 3 # Fails", "1. Parm 3"},
Unmatched( _rcNow )
)},
Update Properties( 1 ),
Target Column( :Parameter )
);
dt << End Data Update;
);
// Label column: Percent to be used to label the graph
dtStack:Percent << Label( 1 );
// Label all rows to show which values from the percent column
// to label
dtStack << Select All Rows << Label( 1 );
dtStack << clear selection;
dtStack << invert row selection;
// Draw the graph
Graph Builder(
Size( 528, 450 ),
Show Control Panel( 0 ),
Variables( X( :Month ), Y( :"% of Total"n ), Overlay( :Parameter ) ),
Elements(
Bar( X, Y, Legend( 7 ), Bar Style( "Stacked" ), Label( "Label by Row" ) )
),
SendToReport(
Dispatch(
{},
"400",
ScaleBox,
{Legend Model(
7,
Properties( 0, {Fill Color( 73 )}, Item ID( "1. Parm 3", 1 ) ),
Properties( 1, {Fill Color( 25 )}, Item ID( "2. Parm 2", 1 ) ),
Properties(
2,
{Fill Color( -7183127 )},
Item ID( "3. Parm 1", 1 )
)
)}
)
)
);