cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
Choose Language Hide Translation Bar
hogi
Level XII

Column Switcher: reduce width

Column switchers are extremely useful.

But they occupy a lot of space in a Dashboard, especially if there is a long column name:

hogi_0-1683882600823.png

Fortunately, the user can adjust the width by resizing the list box:

hogi_1-1683882658641.png

 

Unfortunately, this change is not saved when saving the script.

 

Adjusting the width via set width doesn't seem to work:

Current Report()["Column Switcher",ListBox(4)] << get width()    //works
Current Report()["Column Switcher",ListBox(4)] << set width(100) //doesn't have an effect

 

dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt << New Column( "a nasty very long column name");
dt << Graph Builder(
	Variables( X( :height ), Y( :weight ), Color( :sex ) ),
	Elements( Points( X, Y, Legend( 11 ) ), Smoother( X, Y, Legend( 12 ) ) ),
	Column Switcher(:sex,
		{:sex,:a nasty very long column name}
	)
);

 

1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: Column Switcher: reduce width

Scripting index:

jthi_0-1683883750772.png

 

Names Default To Here(1);

dt = Open("$SAMPLE_DATA/Big Class.jmp");
dt << New Column("a nasty very long column name");
gb = dt << Graph Builder(
	Variables(X(:height), Y(:weight), Color(:sex)),
	Elements(Points(X, Y, Legend(11)), Smoother(X, Y, Legend(12)))
);

colswitcher = gb << Column Switcher(:sex, {:sex, :a nasty very long column name});
colswitcher << set size(100);
-Jarmo

View solution in original post

3 REPLIES 3
jthi
Super User

Re: Column Switcher: reduce width

Scripting index:

jthi_0-1683883750772.png

 

Names Default To Here(1);

dt = Open("$SAMPLE_DATA/Big Class.jmp");
dt << New Column("a nasty very long column name");
gb = dt << Graph Builder(
	Variables(X(:height), Y(:weight), Color(:sex)),
	Elements(Points(X, Y, Legend(11)), Smoother(X, Y, Legend(12)))
);

colswitcher = gb << Column Switcher(:sex, {:sex, :a nasty very long column name});
colswitcher << set size(100);
-Jarmo
hogi
Level XII

Re: Column Switcher: reduce width

Wonderful,  thanks.

 

cs= Current Report()["Column Switcher"] << get scriptable object();
cs<< set size(100);
hogi
Level XII

Re: Column Switcher: reduce width

And for a Dashboard, is there a possibility to resize - and store the setting in the saved Dashboard?
- without changing the JSL code