Are the reference lines you are specifying always set at the current values, for all of your charts? And what you want is for the Y axis to change based upon the current data, but you want to make sure the reference lines are always displayed?
If this is the case, you will need to run the Variability Chart, check to see what the Y axis min and max are, and if they are not the size that will allow for the reference line to be displayed, then dynamically set them.
You will need to do something like
vc = Variability Chart(
Y( :chart_value ),
X( :X, :Y, :link, :Z, :Name( "1" ), :Name( "2" ) ),
Max Iter( 100 ),
Conv Limit( 0.00000001 ),
Number Integration Abscissas( 128 ),
Number Function Evals( 65536 ),
Analysis Type( "Choose best analysis (EMS REML Bayesian)" ),
Connect Cell Means( 1 ),
Std Dev Chart( 0 ),
Where( :spc_chart_subset == "MEAN" & :measurement_set_name == "U" ),
SendToReport(
Dispatch(
{"Variability Chart for chart_value"},
"2",
ScaleBox,
{Minor Ticks( 1 ), Add Ref Line( 0, "Dotted", "Medium Light Gray", "", 1 ),
Add Ref Line( 26.21, "Solid", "Red", "UCL: 26.21", 1 ), Add Ref Line(
-47.05,
"Solid",
"Medium Light Green",
"Target: -47.05",
1
), Add Ref Line( -120.3, "Solid", "Red", "LCL: -120.3", 1 )}
),
Dispatch(
{"Variability Chart for chart_value"},
"Variability Chart",
FrameBox,
{Marker Size( 3 ), Row Legend(
chart_incontrol_flag,
Color( 1 ),
Color Theme( "JMP Default" ),
Marker( 1 ),
Marker Theme( "Solid" ),
Continuous Scale( 0 ),
Reverse Scale( 0 ),
Excluded Rows( 0 )
)}
)
)
);
If(report(vc)[AxisBox(1)]<<get max, < 26.21, report(vc)[AxisBox(1)]<<max(27));
If(report(vc)[AxisBox(1)]<<get min, > -47.05, report(vc)[AxisBox(1)]<<min(-48));
Documentation on manipulating the output Display Tree is found in the JMP Documentation Library, in the Scripting Guide's section on Display Trees.
You can also see the definition of the messages that can be passed to the Axis Boxes in the Scripting Index entry for AxisBox.
Jim