When the alternatives for the column switcher are too long, it elongates the length of the graph. How can we set the column switcher to initially display fewer options, showing a maximum of only 5 items? Users can then scroll down to find more options if they want. As shown in the example below, displaying too many options at once stretches the entire chart.
dt = Open( "$SAMPLE_DATA/Employee Master.jmp" );
Graph Builder(
Size( 534, 658 ),
Show Control Panel( 0 ),
Variables( X( :Unique Id ), Y( :Employee Id ) ),
Elements( Points( X, Y, Legend( 3 ) ) ),
Column Switcher(
:Employee Id,
{:Employee Id, :Job Code, :Position Code, :Intorg Hr, :Intorg Mgr, :Employee Name, :Address Line1,
:Address Line2, :City, :State, :Citizenship Country, :Gender, :Gender Code, :Ethnicity Code,
:Marital Status Code, :Minority Flag, :County, :Postal Code, :Valid From Date, :Hire Date, :Start Date,
:Employee Number, :Birth Date, :Disability Flag, :Military Exp Date, :Minimum Amt, :Midpoint Amt,
:Maximum Amt, :Pay Level Type, :Manager Name, :Intorg Hr1, :Mnmlev1, :Mnmlev2, :Mnmlev3, :Manager Id,
:Job Title Txt, :Job Group Code, :Job Group Desc, :EEO Class Code, :Emp Level, :Exempt Status Code,
:Employee Type Code, :Hours Per Week, :Employee Status Code, :Performance, :Disciplinary Action Flag,
:FLSA Status Code, :Hourly Salary, :Monthly Salary, :Annual Salary, :Annual Salary Z, :Payroll,
:Comratio, :Age, :Over40, :Age Range, :Yrs Of Service, :Length Of Service}
)
);
For example, in the above image, only five items are displayed, while the rest are hidden beneath a scroll menu.
You can use << Set N Lines

Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Employee Master.jmp");
gb = dt << Graph Builder(
Size(534, 658),
Show Control Panel(0),
Variables(X(:Unique Id), Y(:Employee Id)),
Elements(Points(X, Y, Legend(3)))
);
cw = gb << Column Switcher(
:Employee Id,
{:Employee Id, :Job Code, :Position Code, :Intorg Hr, :Intorg Mgr, :Employee Name,
:Address Line1, :Address Line2, :City, :State, :Citizenship Country, :Gender, :Gender Code,
:Ethnicity Code, :Marital Status Code, :Minority Flag, :County, :Postal Code,
:Valid From Date, :Hire Date, :Start Date, :Employee Number, :Birth Date, :Disability Flag,
:Military Exp Date, :Minimum Amt, :Midpoint Amt, :Maximum Amt, :Pay Level Type,
:Manager Name, :Intorg Hr1, :Mnmlev1, :Mnmlev2, :Mnmlev3, :Manager Id, :Job Title Txt,
:Job Group Code, :Job Group Desc, :EEO Class Code, :Emp Level, :Exempt Status Code,
:Employee Type Code, :Hours Per Week, :Employee Status Code, :Performance,
:Disciplinary Action Flag, :FLSA Status Code, :Hourly Salary, :Monthly Salary,
:Annual Salary, :Annual Salary Z, :Payroll, :Comratio, :Age, :Over40, :Age Range,
:Yrs Of Service, :Length Of Service}
);
cw << Set N Lines(5);