Hello, I am very new to JSL and am struggling to think of a way to automatically create multiple reference lines in a graph based on values in a specific column. Currently, I am graphing one variable (:Signal) on the Y axis, and three variables (:Zone, :Target, and :Condition) on the X axis. Each (:Target) variable has a specific (:historical signal) and I would like to find a way to automatically graph a (:Target)'s (:historical signal) as a reference line. The code I have is done by manually adding the historical signal value via h line(), but ideally the script would add a reference line for each (:target) based on its corresponding historical signal. Thank you!
Variability Chart(
Y( :Signal ),
X( :Zone, :Target, :Condition ),
Analysis Type( "Choose best analysis (EMS REML Bayesian)" ),
Show Range Bars( 0 ),
Show Cell Means( 0 ),
Std Dev Chart( 0 ),
Mean Diamonds( 1 ),
SendToReport(
Dispatch(
{"Variability Chart for Signal"},
"Variability Chart",
FrameBox,
{Frame Size( 969, 240 ),
Add Graphics Script(
2,
Description( "" ),
Pen Color( "RED" );
//Target 2
H Line( 0, 2, 234 );
//Target 3
H Line( 2, 4, 670 );
//Target 1
H Line( 4, 6, 463 );
)}
)
)
);