<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Programmatically access Legend Properties with JSL in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Programmatically-access-Legend-Properties-with-JSL/m-p/355723#M60568</link>
    <description>&lt;P&gt;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?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried making the change manually and subsequently 'saved script' using the RED triangle but it does not appear to record this property.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it possible?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="thickey_0-1612402874425.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/29993i603DD74C966E0E20/image-size/medium?v=v2&amp;amp;px=400" role="button" title="thickey_0-1612402874425.png" alt="thickey_0-1612402874425.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 11 Jun 2023 11:10:43 GMT</pubDate>
    <dc:creator>thickey</dc:creator>
    <dc:date>2023-06-11T11:10:43Z</dc:date>
    <item>
      <title>Programmatically access Legend Properties with JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Programmatically-access-Legend-Properties-with-JSL/m-p/355723#M60568</link>
      <description>&lt;P&gt;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?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried making the change manually and subsequently 'saved script' using the RED triangle but it does not appear to record this property.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it possible?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="thickey_0-1612402874425.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/29993i603DD74C966E0E20/image-size/medium?v=v2&amp;amp;px=400" role="button" title="thickey_0-1612402874425.png" alt="thickey_0-1612402874425.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 11 Jun 2023 11:10:43 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Programmatically-access-Legend-Properties-with-JSL/m-p/355723#M60568</guid>
      <dc:creator>thickey</dc:creator>
      <dc:date>2023-06-11T11:10:43Z</dc:date>
    </item>
    <item>
      <title>Re: Programmatically access Legend Properties with JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Programmatically-access-Legend-Properties-with-JSL/m-p/355804#M60573</link>
      <description>&lt;P&gt;You can use gb &amp;lt;&amp;lt; Show Tree Structure() to give idea of the elements and with that you can usually get idea how to access specific element&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_0-1612421485880.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/30000iF96AA08C2ADC1D4F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_0-1612421485880.png" alt="jthi_0-1612421485880.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In this case you can access LegendBox this way:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;gb_report = gb &amp;lt;&amp;lt; Report; 
legend = gb_report[legendbox(1)];&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;and set property most likely with &lt;EM&gt;legend&amp;nbsp;&amp;lt;&amp;lt; Enabled(0)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Full example:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
gb = dt &amp;lt;&amp;lt; Graph Builder(
	Show Control Panel(0),
	Variables(X(:sex), Y(:height), Group X(:age)),
	Elements(Box Plot(X, Y, Legend(1)))
);

gb_report = gb &amp;lt;&amp;lt; Report; 
legend = gb_report[legendbox(1)];
legend &amp;lt;&amp;lt; Enabled(0);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Feb 2021 06:53:15 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Programmatically-access-Legend-Properties-with-JSL/m-p/355804#M60573</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2021-02-04T06:53:15Z</dc:date>
    </item>
  </channel>
</rss>

