Gráfico de barras apiladas del generador de gráficosJMP 17 Se adjunta una tabla de datos simple que contiene números mensuales de # total de piezas, total de fallas, % total de fallas y luego números individuales para los cuales el parámetro falló. El gráfico de barras apiladas que quiero es Mes en el eje X y % Total de errores en el eje Y. Luego, me gustaría que esas barras se apilaran con el desglose de qué parámetro falló en el porcentaje mensual de cada parámetro. A continuación se muestra una captura de pantalla, consulte la figura 1, de algo que diseñé en ppt. No pude obtener esto en Graph Builder. Intenté apilar los datos, manipular columnas, pero no lo hice.
En resumen, quiero el porcentaje total general de piezas fallidas en el eje Y como una barra, luego esa barra muestra el porcentaje de cada parámetro que falló para cada mes. A continuación se adjunta una tabla de datos de muestra. Gracias.
Figura 1

Exploración y visualización de datosventanasRe: Gráfico de barras apiladas del Generador de gráficosJim:
Gracias por su respuesta. No conocía la opción de pila de series múltiples, por lo que es un gran consejo. El único problema con el gráfico que generaste fue el eje Y. Estaba buscando el % total por mes como altura total de la barra. Entonces, para enero sería el 10%, el 4% de febrero y el 15% de marzo. El eje Y sería el porcentaje general mensual de fallas. Luego, cada una de esas barras se subdividiría en los porcentajes de los Parámetros fallidos. La barra general del 10 % de enero se subdividiría en 20 % Parm 1 / 80 % Parm 2. La barra general del 4% de febrero se subdividiría en 16,7% Parm 1 / 50% Parm 2 / 33,3% Parm 3. Entonces, la barra general del 15 % de marzo se subdividiría en 37 % Parm 1 / 29,6 % Parm 2 / 33,3 % Parm 3. Es posible que necesite ajustar más la tabla porque todavía no puedo hacerlo a través de Graph Builder. Gracias de nuevo.
Re: Gráfico de barras apiladas del Generador de gráficosEl gráfico que desea requiere un cambio en la estructura de su tabla de datos y la configuración de algunos estados de fila y estados de columna de la tabla de datos.

El siguiente script cambia la estructura de la tabla de datos y luego dibuja el gráfico final anterior.Todo lo que aparece en el guión se puede hacer de forma interactiva.De hecho, todo se hizo de forma interactiva y luego simplemente tomé el script que me proporcionó JMP y lo copié en un script final.
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 )
)
)}
)
)
);
Aquí está la tabla de datos reestructurada que se utilizó para crear el gráfico final.

Re: Gráfico de barras apiladas del Generador de gráficosJim:
Finalmente conseguí que algo funcionara a través de Graph Builder. Gracias por la solución que proporcionaste. Las series múltiples que usted señaló son de gran ayuda en el futuro, así como el código para este ejercicio. Gracias de nuevo.
Re: Gráfico de barras apiladas del Generador de gráficosCambiar al % del total es una fórmula matemática simple: proporcione las columnas en la tabla de datos apilados.Acabo de agregar una nueva columna llamada % del total y luego la usé en el gráfico como eje 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 )
)
)}
)
)
);