I am trying to add ref lines to chart and I want them to change whenever I filter to other chart types in the report (the limits are deferents). I couldn't find out how to do it.
I tried this:
Dispatch(
{},
"2",
ScaleBox,
{
dt_final << get selected rows;
check = dt_final << Get Rows Where(:CHART_TYPE == "UNIF-3" );
If( N Rows( check ) > 0,
nc2u1[Axis Box(1)] << Add Ref Line( 5, "Solid", "Medium Dark Red", "LL", 10));}
And this:
{if (:CHART_TYPE[1] == "X-BAR",
Add Ref Line( 100, "Solid", "red", "UCL", 1 ),
Add Ref Line( 150, "Solid", "red", "CENTERLINE", 1 ),
Add Ref Line( 200, "Solid", "red", "LCL", 1 ));
}Take a look at the Column Property, "Control Limits". It allows you to have multiple copies of Control Limits, for each of the different chart types, and will display the appropriate limits with the appropriate charts.
@txnelson is right on. Its way-way easier to use the built in column property that trying to script this.