Hello,
I have a data table where I create a subset data table that only contains the data that I want to appear in my Control Chart. For some reason, the subset data appears correctly in the chart but the Row Legend still contains all of the data values from the original data table as well. How can I make it so that the Row Legend only displays data from the subset data table (the values noted in the script as "ColumnP")?
dt=Data Table("SPC Chart")<< Clear Column Selection;
ColumnP ={5, 11, 13, 19, 27};
dt<<select where(contains(ColumnP, :Name("Column P Data")));
dt<< Subset(
output table name( "Subset Column P" ));//, invisible);
dt2=Data Table("Subset Column P");
dt2<< Clear Row States;
dt2<<Current Data Table() << Color by Column(
Name( "Column P Data" ),
Color( 1 ),
Color Theme( "JMP Default" ),
Marker( 0 ),
Marker Theme( "" ),
Continuous Scale( 1 ),
Reverse Scale( 0 ),
Excluded Rows( 0 )
);
dt2<<Control Chart(
Sample Label( :Date),
Group Size( 1 ),
KSigma( 3 ),
Chart Col( :Name( "Column E Data" ), Individual Measurement, Moving Range ),
Where( :StepNumber == 1 & :Material == "Substance"),
SendToReport(
Dispatch(
{"Individual Measurement of Column E Data"},
"IR Chart of IM",
FrameBox,
{Frame Size( 800, 200 )}
),
Dispatch(
{"Individual Measurement of Column E Data"},
"IR Chart of IM",
FrameBox,
{Frame Size( 800, 200 ), Row Legend(Name( "Column P Data" ),
Color( 1 ),
Color Theme( "JMP Default" ),
Marker( 0 ),
Marker Theme( "" ),
Continuous Scale( 1 ),
Reverse Scale( 0 ),
Excluded Rows( 0 ))}
),
Dispatch(
{"Moving Range of Column E Data"},
"IR Chart of MR",
FrameBox,
{Frame Size( 800, 200 )}
),
Dispatch(
{"Moving Range of Column E Data"},
"IR Chart of MR",
FrameBox,
{Frame Size( 800, 200 )}
)
)
);