<?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 GraphBuilder Legend hook in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/GraphBuilder-Legend-hook/m-p/717712#M89938</link>
    <description>&lt;P&gt;There are many useful instances of being able to have a hook onto the selection state change of a legend for a chart / graph.&amp;nbsp; With the non graph-builder method of generating charts' and graphs' legends (using &lt;CODE class=" language-jsl"&gt;Row Legend()&lt;/CODE&gt;), this was quite simple as the display element was simply a &lt;CODE class=" language-jsl"&gt;Table Box()&lt;/CODE&gt; that can receive a &lt;CODE class=" language-jsl"&gt;Set Row Change Function()&lt;/CODE&gt; message.&amp;nbsp; The same cannot be done (to my knowledge) with Graph Builder's Legend Server.&amp;nbsp; In general I find Graph Builder's legend to be poorly designed when it comes to modifications and hooks (also it swaps the color settings of 2nd and 3rd items).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And while a hacky work-around can be to look at the row-states of the underlying table, it does not meet most of the needs for most UI purposes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is anyone aware of how to get a hook into the Legend Server's selection state, like what is done in the script below for a &lt;CODE class=" language-jsl"&gt;Row Legend()&lt;/CODE&gt;?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
New Window( "Test",
	olb = Outline Box( "",
		dt &amp;lt;&amp;lt; Bivariate( y( :weight ), x( :height ) );
	)
);
olb[Frame Box( 1 )] &amp;lt;&amp;lt; Row Legend( "age", color( 1 ), Marker( 1 ) );

olb[Table Box( 1 )] &amp;lt;&amp;lt; Set Row Change Function(
	Function( {box},
		show( box &amp;lt;&amp;lt; Get Selected Rows )
	)
)&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Thanks!&lt;/P&gt;</description>
    <pubDate>Thu, 18 Jan 2024 02:41:03 GMT</pubDate>
    <dc:creator>ErraticAttack</dc:creator>
    <dc:date>2024-01-18T02:41:03Z</dc:date>
    <item>
      <title>GraphBuilder Legend hook</title>
      <link>https://community.jmp.com/t5/Discussions/GraphBuilder-Legend-hook/m-p/717712#M89938</link>
      <description>&lt;P&gt;There are many useful instances of being able to have a hook onto the selection state change of a legend for a chart / graph.&amp;nbsp; With the non graph-builder method of generating charts' and graphs' legends (using &lt;CODE class=" language-jsl"&gt;Row Legend()&lt;/CODE&gt;), this was quite simple as the display element was simply a &lt;CODE class=" language-jsl"&gt;Table Box()&lt;/CODE&gt; that can receive a &lt;CODE class=" language-jsl"&gt;Set Row Change Function()&lt;/CODE&gt; message.&amp;nbsp; The same cannot be done (to my knowledge) with Graph Builder's Legend Server.&amp;nbsp; In general I find Graph Builder's legend to be poorly designed when it comes to modifications and hooks (also it swaps the color settings of 2nd and 3rd items).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And while a hacky work-around can be to look at the row-states of the underlying table, it does not meet most of the needs for most UI purposes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is anyone aware of how to get a hook into the Legend Server's selection state, like what is done in the script below for a &lt;CODE class=" language-jsl"&gt;Row Legend()&lt;/CODE&gt;?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
New Window( "Test",
	olb = Outline Box( "",
		dt &amp;lt;&amp;lt; Bivariate( y( :weight ), x( :height ) );
	)
);
olb[Frame Box( 1 )] &amp;lt;&amp;lt; Row Legend( "age", color( 1 ), Marker( 1 ) );

olb[Table Box( 1 )] &amp;lt;&amp;lt; Set Row Change Function(
	Function( {box},
		show( box &amp;lt;&amp;lt; Get Selected Rows )
	)
)&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jan 2024 02:41:03 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/GraphBuilder-Legend-hook/m-p/717712#M89938</guid>
      <dc:creator>ErraticAttack</dc:creator>
      <dc:date>2024-01-18T02:41:03Z</dc:date>
    </item>
  </channel>
</rss>

