cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • DownloadSemiconductor Toolkit: Tools to create wafer maps, add wafer geometry to graphics, explore die defects & compare wafers.
  • Discovery Summit 2026: Early User Edition - September 23-24.Register. It's free.
  • See how to access JMP Marketplace - and - find, create & share add-ins to extend your JMP. Watch video.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
thickey
Level III

Programmatically access Legend Properties with JSL

I want to disable the default 'click-ability' feature of a legend. I can achieve this manually by selecting the legend properties (in a platform) and un-selecting the 'Enabled' checkbox. But how do I access these properties programmatically?

 

I tried making the change manually and subsequently 'saved script' using the RED triangle but it does not appear to record this property. 

Is it possible?

 

thickey_0-1612402874425.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: Programmatically access Legend Properties with JSL

You can use gb << Show Tree Structure() to give idea of the elements and with that you can usually get idea how to access specific element

jthi_0-1612421485880.png

 

In this case you can access LegendBox this way:

gb_report = gb << Report; 
legend = gb_report[legendbox(1)];

and set property most likely with legend << Enabled(0)

 

Full example:

Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
gb = dt << Graph Builder(
	Show Control Panel(0),
	Variables(X(:sex), Y(:height), Group X(:age)),
	Elements(Box Plot(X, Y, Legend(1)))
);

gb_report = gb << Report; 
legend = gb_report[legendbox(1)];
legend << Enabled(0);

 

-Jarmo

View solution in original post

1 REPLY 1
jthi
Super User

Re: Programmatically access Legend Properties with JSL

You can use gb << Show Tree Structure() to give idea of the elements and with that you can usually get idea how to access specific element

jthi_0-1612421485880.png

 

In this case you can access LegendBox this way:

gb_report = gb << Report; 
legend = gb_report[legendbox(1)];

and set property most likely with legend << Enabled(0)

 

Full example:

Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
gb = dt << Graph Builder(
	Show Control Panel(0),
	Variables(X(:sex), Y(:height), Group X(:age)),
	Elements(Box Plot(X, Y, Legend(1)))
);

gb_report = gb << Report; 
legend = gb_report[legendbox(1)];
legend << Enabled(0);

 

-Jarmo

Recommended Articles