Control Chart Builder y axis scale - can I set dynamically using JSL?

Jan 21, 2016 6:15 PM(4164 views)

New to Control Chart Builder, but I am liking it so far! It appears that local data filters work with this platform (whereas control charts prior to CCB did not support them?). Only issue I am having is that when a local data filter is used, the selection in the filter does not prompt a scale adjustment. I notice the LCL/Avg/UCL are updated based on the local data filter selection, but the scale stays static.

First question, is there a way to force a scale recalc? If not, I thought of the following option:

I can send scale changes via this jsl snippet when I generate the chart initially:

<!--

SendToReport(

Dispatch(

{},

"area",

ScaleBox,

{Min( 0 ), Max( 500 ), Inc( 50 ), Minor Ticks( 1 )}

)

)

-->

but what I really need is for the scale to be set based on the local data filter selection.

My thought is I could use the dynamically calculated LCL and UCL to adjust the Min and Max scale settings:

Is there a way to access the UCL and LCL values dynamically(with each recalc)?

If so, I could set them as variables and then use a formula to set the scale:

Re: Control Chart Builder y axis scale - can I set dynamically using JSL?

Jan 22, 2016 6:42 AM(7116 views)

I have worked my example a little further. It now dynamically changes the axis when the data filter is changed. The data filter is now a global filter, so the code can pick up the changes in the selection in the data table

Names Default To Here(1);

dt =Open("$SAMPLE_DATA\semiconductor capability.jmp");

f =Function({a},

// Capture the LCL and UCL from the Limit Summaries Outline Box in the Report Output

Re: Control Chart Builder y axis scale - can I set dynamically using JSL?

Jan 22, 2016 4:47 AM(3936 views)

The report output from the platforms is available to jsl. The script below runs a control chart builder and then captures the UCL and the LCL from the output, and applies it to the axis setting of the report.

The Tree Structure of the report output can be seen by rt. mouse clicking on the Expand/Collapse (gray triangle) for the Outline Box of the report, and then selecting Edit==>Show Tree Structure.

Names default to here(1);

dt =open("$SAMPLE_DATA\semiconductor capability.jmp");

ccb=Control Chart Builder(

Size(534,453),

Show Control Panel(0),

Variables( Y(:NPN1 )),

Chart( Position(1), Limits ),

Chart( Position(2)),

Local Data Filter( Add Filter( columns(:SITE ))),

SendToReport(

Dispatch(

{},

"NPN1",

ScaleBox,

{Min(96.6346153846154),Max(131.634615384615), Inc(5),

Minor Ticks(0), Add Ref Line(

104.412948990151,

"Solid",

"Blue",

"LSL",

1

), Add Ref Line(131.893493064355,"Solid","Blue","USL",1),

Add Ref Line(118.153221027253,"Solid","Blue","Target",1)}

)

)

);

// Capture the LCL and UCL from the Limit Summaries Outline Box in the Report Output

Re: Control Chart Builder y axis scale - can I set dynamically using JSL?

Jan 22, 2016 6:42 AM(7117 views)

I have worked my example a little further. It now dynamically changes the axis when the data filter is changed. The data filter is now a global filter, so the code can pick up the changes in the selection in the data table

Names Default To Here(1);

dt =Open("$SAMPLE_DATA\semiconductor capability.jmp");

f =Function({a},

// Capture the LCL and UCL from the Limit Summaries Outline Box in the Report Output