Scripting Guide > Data Tables > Columns > Add a Column Switcher
发布日期: 08/07/2020

Add a Column Switcher

Use JSL to add a Column Switcher panel to a report window. The Column Switcher lets you quickly analyze different variables without having to re-create your analysis.

obj << Column Switcher(<default_col>(<col1>, <col2>, ...);
// add a Column Switcher to the report
 
obj << Remove Column Switcher();
// remove the Column Switcher from a report

For example, add the Column Switcher to a Contingency report for the Car Poll.jmp data as follows:

dt = Open( "$SAMPLE_DATA/Car Poll.jmp" );
obj = Contingency(
	Y( :size ),
	X( :marital status )
);
ColumnSwitcherObject = obj <<
Column Switcher(
	:marital status,
	{:sex, :country, :marital status}
);
// number of pixels for the switcher width
ColumnSwitcherObject << Set Size( 200 );
 

// number of columns to display in the switcher

ColumnSwitcherObject << Set NLines( 6 );

For more information about the Column Switcher, see Column Switcher in Using JMP.

需要更多信息?有问题?从 JMP 用户社区得到解答 (community.jmp.com).