It is possible to set up the data table to color your fishbone with a script. Here are the three key steps and a few notes on what is happening.
1. The data table must be sorted in the order the fishbone is created. Any row with a Parent that was a Child in a preceding row, must be in the subsequent row. The Ishikawa.jmp data set is not in this order. The script below will create a new data table called "Ishikawa Sorted". Notice, for example, that within Solder Process there is a Child called Temperature which is a Parent in other rows. Solder Process, Temperature is in row 9 and Temperature, Setup immediately follows in row 10.
2. Add a column called "Color" that contains a standard JMP color. For demonstration purposes, the script below adds this column and also adds a Row State column for this color and colors the data table to make the color scheme apparent. I have colored the 5 potential root cause categories separate colors. I have also colored some of them gray which you could do, for example, as you reach a conclusion about potential root cause.
3. The final step is to run the script that 1) creates the fishbone diagram, 2) pulls the colors from the data table, and 3) colors the text in the fishbone. A script that contains these three steps can be saved to your data table. The text strings in the fishbone diagram are stored in text edit boxes. The first text edit box corresponds to the first or highest order parent in the data table which, in this case, is "Defects in circuit board". That is why the For loop contains i+1 for the text edit box and i for the corresponding color.
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Ishikawa.jmp" );
//Reorder by defect groups
dt << New Column("Row Order", set values (
{1,5,15,21,27,2,3,4,6,7,8,9,12,10,11,13,14,16,17,
18,19,20,22,25,26,23,24,28,29,30,31,32,33})
);
ndt = Data Table( "Ishikawa" ) << Sort(
By( :Row Order ),
Order( Ascending ),
Output Table( "Ishikawa Sorted" )
);
//Add column for color, color rows by color
ndt << New Column ("Color", set values(
{4,4,4,1,5,5,5,5,1,1,1,5,5,5,3,
3,3,3,3,3,8,8,8,8,8,8,6,6,6,6,6,1,6})
);
ndt << New column ("Color State", "Row State", Formula(Color State( :Color )));
Column(ndt,"Color State")<<Copy to Row States();
ndt << Color Rows by Row State;
//Make fishbone and get display box
fb = ndt << Diagram(
Y( :Child ),
X( :Parent ))
;
fbrep = fb<<report;
//Color text edit boxes by color in data table
colorlist = ndt:Color<<get values();
for (i=1, i<=nitems(colorlist), i++,
fbrep[texteditbox(i+1)]<<font color(colorlist[i])
);