I have a data table with numerous responses (numerous columns). All are valid to be control charted.
When I add a column switcher I can, as expected, easily switch between responses (different columns) to update the control chart so I can look immediately at the variable of interest.
The only shortcoming is that the x-axis is always, by default, the same length but the number of data in each column varies; sometimes a lot but sometimes not.
To adapt the x-axis to the number of data in any given column I can do this:
nData = N Rows() - Col N Missing( Column( 1 ) );
ccReport = cc << Report;
axisbox = ccReport[axis box( 1 )];
axisbox << Max( nData + 3 ) << inc( Ceiling( (nData + 3) / 15 ) );
This works great for the first control chart, but as soon as I select another variable using the column switcher the x-axis is once again too long, returning to its default setting. (If N Rows() is e.g. 3,000 but for one variable I have 60 data, the resulting chart looks silly because the x-axis is way too long.)
Using JSL, how can I script so that each time I select another column using column switcher I can use the above code (or equivalent) to adjust the x-axis to well adapt to the number of actual data for the variable in question?
I see that this syntax "ColumnSwitcherObject << Get Current;" returns the name of the column but how do I access with JSL each time I update using column switcher?
Thanks for any help.