<?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 回复： How does JSL implement a click-to-get variable value in such a graph? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-does-JSL-implement-a-click-to-get-variable-value-in-such-a/m-p/740569#M92196</link>
    <description>&lt;UL&gt;&lt;LI&gt;&lt;P class=""&gt;How to execute this JSL with a mouse click?&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2024-03-29_14-01-34.png" style="width: 569px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/62882i2AFC98B368268D4F/image-size/large?v=v2&amp;amp;px=999" role="button" title="2024-03-29_14-01-34.png" alt="2024-03-29_14-01-34.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 29 Mar 2024 06:03:45 GMT</pubDate>
    <dc:creator>lala</dc:creator>
    <dc:date>2024-03-29T06:03:45Z</dc:date>
    <item>
      <title>How does JSL implement a click-to-get variable value in such a graph?</title>
      <link>https://community.jmp.com/t5/Discussions/How-does-JSL-implement-a-click-to-get-variable-value-in-such-a/m-p/740536#M92193</link>
      <description>&lt;P&gt;Follow the script below.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
p1 = dt &amp;lt;&amp;lt; Graph Builder(
	Variables( X( :weight ), Y( :height ), Group X( :age ), Color( :sex ) ),
	Elements( Bar( X, Y, Legend( 5 ), Response Axis( "X" ), Summary Statistic( "Sum" ) ) )
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;How to write JSL How to achieve in the graph by clicking on a certain age bar, get this age value?And use this value to perform subsequent operations.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2024-03-29_13-38-06.png" style="width: 843px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/62880i90BB89238FA13FDE/image-size/large?v=v2&amp;amp;px=999" role="button" title="2024-03-29_13-38-06.png" alt="2024-03-29_13-38-06.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Mar 2024 05:43:48 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-does-JSL-implement-a-click-to-get-variable-value-in-such-a/m-p/740536#M92193</guid>
      <dc:creator>lala</dc:creator>
      <dc:date>2024-03-29T05:43:48Z</dc:date>
    </item>
    <item>
      <title>回复： How does JSL implement a click-to-get variable value in such a graph?</title>
      <link>https://community.jmp.com/t5/Discussions/How-does-JSL-implement-a-click-to-get-variable-value-in-such-a/m-p/740540#M92194</link>
      <description>&lt;P&gt;If click on the space indicated by this arrow, can get the age value =14?&lt;BR /&gt;It's a left mouse click, not Hover Labels.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Mar 2024 05:44:37 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-does-JSL-implement-a-click-to-get-variable-value-in-such-a/m-p/740540#M92194</guid>
      <dc:creator>lala</dc:creator>
      <dc:date>2024-03-29T05:44:37Z</dc:date>
    </item>
    <item>
      <title>回复： How does JSL implement a click-to-get variable value in such a graph?</title>
      <link>https://community.jmp.com/t5/Discussions/How-does-JSL-implement-a-click-to-get-variable-value-in-such-a/m-p/740558#M92195</link>
      <description>&lt;P&gt;？？&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;frame = (p1 &amp;lt;&amp;lt; report)[FrameBox( 1 )];
frame &amp;lt;&amp;lt; Set Graphlet(
	Picture(
		dataage = Parse( age:_where );//??
		d2 = Open( "$SAMPLE_DATA/Big Class Families.jmp" );
		d2 &amp;lt;&amp;lt; Select Where( age == dataage );
		d3 = d2 &amp;lt;&amp;lt; Subset( Output Table( "test" ), Selected Rows( 1 ), selected columns( 0 ) );
		Try( d3 &amp;lt;&amp;lt; Delete Table Property( "Source" ) );
	
	),
	Reapply( 1 )
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 29 Mar 2024 14:18:48 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-does-JSL-implement-a-click-to-get-variable-value-in-such-a/m-p/740558#M92195</guid>
      <dc:creator>lala</dc:creator>
      <dc:date>2024-03-29T14:18:48Z</dc:date>
    </item>
    <item>
      <title>回复： How does JSL implement a click-to-get variable value in such a graph?</title>
      <link>https://community.jmp.com/t5/Discussions/How-does-JSL-implement-a-click-to-get-variable-value-in-such-a/m-p/740569#M92196</link>
      <description>&lt;UL&gt;&lt;LI&gt;&lt;P class=""&gt;How to execute this JSL with a mouse click?&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2024-03-29_14-01-34.png" style="width: 569px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/62882i2AFC98B368268D4F/image-size/large?v=v2&amp;amp;px=999" role="button" title="2024-03-29_14-01-34.png" alt="2024-03-29_14-01-34.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Mar 2024 06:03:45 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-does-JSL-implement-a-click-to-get-variable-value-in-such-a/m-p/740569#M92196</guid>
      <dc:creator>lala</dc:creator>
      <dc:date>2024-03-29T06:03:45Z</dc:date>
    </item>
    <item>
      <title>回复： How does JSL implement a click-to-get variable value in such a graph?</title>
      <link>https://community.jmp.com/t5/Discussions/How-does-JSL-implement-a-click-to-get-variable-value-in-such-a/m-p/740937#M92207</link>
      <description>&lt;P&gt;&lt;SPAN&gt;If it is triggered with Hover Labels, why can it only be triggered to open Big Class Families.jmp at age ==12?&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P class=""&gt;How can I make other age columns trigger as well?&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;txt = "a";
Set Clipboard( txt );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
p1 = dt &amp;lt;&amp;lt; Graph Builder(
	Variables( X( :weight ), Y( :height ), Group X( :age ), Color( :sex ) ),
	Elements( Bar( X, Y, Legend( 5 ), Response Axis( "X" ), Summary Statistic( "Sum" ) ) )

,
	SendToReport(
		Dispatch(
			{},
			"Graph Builder",
			FrameBox,
			Set Textlet(
				Setup(
					expr = Parse( local:_where );
					a = local:_dataTable &amp;lt;&amp;lt; Get Rows Where( expr );
					Set Clipboard( a[1] );
					local:r = local:_dataTable &amp;lt;&amp;lt; Get Rows Where( expr );
				),
				Markup( "{local:r}rows" )
			)
		)
	)
);
txt = Get Clipboard();
frame = (p1 &amp;lt;&amp;lt; report)[FrameBox( 1 )];
frame &amp;lt;&amp;lt; Set Graphlet(
	Picture(
		dataage = txt; //Parse( age:_where );//??
		d2 = Open( "$SAMPLE_DATA/Big Class Families.jmp" );
		d2 &amp;lt;&amp;lt; Select Where( age == dataage );
		d3 = d2 &amp;lt;&amp;lt; Subset( Output Table( "test" ), Selected Rows( 1 ), selected columns( 0 ) );
		Try( d3 &amp;lt;&amp;lt; Delete Table Property( "Source" ) );
	),
	Reapply( 1 )
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2024-03-29_22-20-50.png" style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/62895i3B995F0A20C8366B/image-size/large?v=v2&amp;amp;px=999" role="button" title="2024-03-29_22-20-50.png" alt="2024-03-29_22-20-50.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Mar 2024 14:25:26 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-does-JSL-implement-a-click-to-get-variable-value-in-such-a/m-p/740937#M92207</guid>
      <dc:creator>lala</dc:creator>
      <dc:date>2024-03-29T14:25:26Z</dc:date>
    </item>
    <item>
      <title>回复： How does JSL implement a click-to-get variable value in such a graph?</title>
      <link>https://community.jmp.com/t5/Discussions/How-does-JSL-implement-a-click-to-get-variable-value-in-such-a/m-p/740940#M92209</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Open( "$SAMPLE_DATA/Big Class.jmp", invisible );
p1 = dt &amp;lt;&amp;lt; Graph Builder(
	Show Control Panel( 0 ),
	Variables( X( :weight ), Y( :height ), Group X( :age ), Color( :sex ) ),
	Elements( Bar( X, Y, Legend( 5 ), Response Axis( "X" ), Summary Statistic( "Sum" ) ) )
);
// this graphbuilder chart has multiple FrameBoxes. Get a list of them.
framelist = Report( p1 ) &amp;lt;&amp;lt; XPath( "(//OutlineBox[text()='Graph Builder']//FrameBox)" );
// each framebox needs a graphis script with a Mousetrap to detect clicks.
For( iFrame = 1, iFrame &amp;lt;= N Items( framelist ), iFrame += 1,
	frame = framelist[iFrame];
	// the mousetrap needs to capture the iFrame value when it is
	// built so it can report it later; use eval(evalexpr(...expr()...))
	Eval(
		Eval Expr(
			frame &amp;lt;&amp;lt; Addgraphicsscript(
				Mousetrap(
					{/*nothing on mouse drag, it happens a lot*/}//
				, // but on mouse up, do something. MouseUp only happens once per click.
					xx = x;
					yy = y;
					Show( xx, yy, Expr( iFrame ) );
					// run your script here
				)
			)
		)
	);
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 29 Mar 2024 14:46:02 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-does-JSL-implement-a-click-to-get-variable-value-in-such-a/m-p/740940#M92209</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2024-03-29T14:46:02Z</dc:date>
    </item>
    <item>
      <title>回复： How does JSL implement a click-to-get variable value in such a graph?</title>
      <link>https://community.jmp.com/t5/Discussions/How-does-JSL-implement-a-click-to-get-variable-value-in-such-a/m-p/741230#M92218</link>
      <description>&lt;P&gt;Thanks Experts!&lt;/P&gt;&lt;P&gt;Very amazing, have seen xx, yy and Expr(iFrame) changes.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2024-03-30_07-35-38.png" style="width: 656px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/62899i4B7FEE0A73957DCF/image-size/large?v=v2&amp;amp;px=999" role="button" title="2024-03-30_07-35-38.png" alt="2024-03-30_07-35-38.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Mar 2024 23:42:05 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-does-JSL-implement-a-click-to-get-variable-value-in-such-a/m-p/741230#M92218</guid>
      <dc:creator>lala</dc:creator>
      <dc:date>2024-03-29T23:42:05Z</dc:date>
    </item>
    <item>
      <title>回复： How does JSL implement a click-to-get variable value in such a graph?</title>
      <link>https://community.jmp.com/t5/Discussions/How-does-JSL-implement-a-click-to-get-variable-value-in-such-a/m-p/741241#M92219</link>
      <description>&lt;P&gt;&lt;SPAN&gt;But why doesn't this script work in the Chinese version of JMP Pro 17.0?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;win10&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2024-03-30_07-45-57.png" style="width: 801px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/62900i6DDD8C867144A746/image-size/large?v=v2&amp;amp;px=999" role="button" title="2024-03-30_07-45-57.png" alt="2024-03-30_07-45-57.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Mar 2024 23:50:51 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-does-JSL-implement-a-click-to-get-variable-value-in-such-a/m-p/741241#M92219</guid>
      <dc:creator>lala</dc:creator>
      <dc:date>2024-03-29T23:50:51Z</dc:date>
    </item>
    <item>
      <title>回复： How does JSL implement a click-to-get variable value in such a graph?</title>
      <link>https://community.jmp.com/t5/Discussions/How-does-JSL-implement-a-click-to-get-variable-value-in-such-a/m-p/741245#M92220</link>
      <description>&lt;P class=""&gt;&lt;SPAN class=""&gt;Set my version 17 of JMP to English.&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;It works, but there will be Chinese in the log?&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;Thanks!&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2024-03-30_07-54-09.png" style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/62902iEAD565E0C4381063/image-size/large?v=v2&amp;amp;px=999" role="button" title="2024-03-30_07-54-09.png" alt="2024-03-30_07-54-09.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Mar 2024 23:58:54 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-does-JSL-implement-a-click-to-get-variable-value-in-such-a/m-p/741245#M92220</guid>
      <dc:creator>lala</dc:creator>
      <dc:date>2024-03-29T23:58:54Z</dc:date>
    </item>
    <item>
      <title>回复： How does JSL implement a click-to-get variable value in such a graph?</title>
      <link>https://community.jmp.com/t5/Discussions/How-does-JSL-implement-a-click-to-get-variable-value-in-such-a/m-p/741284#M92221</link>
      <description>&lt;P&gt;I grabbed this&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;"(//OutlineBox[text()='Graph Builder']//FrameBox)"&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;from here&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="right-click the outline triangle, choose Show Properties. Click one of the graphs." style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/62903iBE54D68AFC6C5FC5/image-size/large?v=v2&amp;amp;px=999" role="button" title="capture.png" alt="right-click the outline triangle, choose Show Properties. Click one of the graphs." /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;right-click the outline triangle, choose Show Properties. Click one of the graphs.&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;you might simplify it to&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;framelist = Report( p1 ) &amp;lt;&amp;lt; XPath( "(//FrameBox)" );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 30 Mar 2024 03:14:33 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-does-JSL-implement-a-click-to-get-variable-value-in-such-a/m-p/741284#M92221</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2024-03-30T03:14:33Z</dc:date>
    </item>
    <item>
      <title>回复： How does JSL implement a click-to-get variable value in such a graph?</title>
      <link>https://community.jmp.com/t5/Discussions/How-does-JSL-implement-a-click-to-get-variable-value-in-such-a/m-p/741306#M92222</link>
      <description>&lt;P&gt;OK&lt;/P&gt;&lt;P&gt;Thank Craige!&lt;BR /&gt;You taught me how to solve problems so that I didn't just copy code.&lt;BR /&gt;Thanks Experts!&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2024-03-30_11-38-31.png" style="width: 768px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/62904i1CE959B8CD8DF78F/image-size/large?v=v2&amp;amp;px=999" role="button" title="2024-03-30_11-38-31.png" alt="2024-03-30_11-38-31.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 30 Mar 2024 03:44:01 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-does-JSL-implement-a-click-to-get-variable-value-in-such-a/m-p/741306#M92222</guid>
      <dc:creator>lala</dc:creator>
      <dc:date>2024-03-30T03:44:01Z</dc:date>
    </item>
    <item>
      <title>回复： How does JSL implement a click-to-get variable value in such a graph?</title>
      <link>https://community.jmp.com/t5/Discussions/How-does-JSL-implement-a-click-to-get-variable-value-in-such-a/m-p/741660#M92227</link>
      <description>&lt;P&gt;For those who are too lazy to click - or too lazy to use Expression Handling: use the &lt;EM&gt;Picture&lt;/EM&gt; part of the Hover label.&lt;/P&gt;&lt;P&gt;The reaction is immediate (much faster than the time it takes till the hover label appears).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;div class="lia-vid-container video-embed-center"&gt;&lt;div id="lia-vid-6350005112112w458h328r43" class="lia-video-brightcove-player-container"&gt;&lt;video-js data-video-id="6350005112112" data-account="6058004218001" data-player="default" data-embed="default" class="vjs-fluid" controls="" data-application-id="" style="width: 100%; height: 100%;"&gt;&lt;/video-js&gt;&lt;/div&gt;&lt;script src="https://players.brightcove.net/6058004218001/default_default/index.min.js"&gt;&lt;/script&gt;&lt;script&gt;(function() {  var wrapper = document.getElementById('lia-vid-6350005112112w458h328r43');  var videoEl = wrapper ? wrapper.querySelector('video-js') : null;  if (videoEl) {     if (window.videojs) {       window.videojs(videoEl).ready(function() {         this.on('loadedmetadata', function() {           this.el().querySelectorAll('.vjs-load-progress div[data-start]').forEach(function(bar) {             bar.setAttribute('role', 'presentation');             bar.setAttribute('aria-hidden', 'true');           });         });       });     }  }})();&lt;/script&gt;&lt;a class="video-embed-link" href="https://community.jmp.com/t5/video/gallerypage/video-id/6350005112112"&gt;(view in My Videos)&lt;/a&gt;&lt;/div&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Open( "$SAMPLE_DATA/Big Class.jmp", invisible );
gb = dt &amp;lt;&amp;lt; Graph Builder(
	Show Control Panel( 0 ),
	Variables( X( :weight ), Y( :height ), Group X( :age ), Color( :sex ) ),
	Elements( Bar( X, Y, Legend( 5 ), Response Axis( "X" ), Summary Statistic( "Sum" ) ) )
);
fbs = Report( gb ) &amp;lt;&amp;lt; XPath( "//FrameBox" );

For Each( {fb}, fbs,
	fb &amp;lt;&amp;lt; Set Graphlet( Picture( Caption( Char( myAge = :age[local:_firstRow] ) ) ) )
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 30 Mar 2024 19:33:02 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-does-JSL-implement-a-click-to-get-variable-value-in-such-a/m-p/741660#M92227</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2024-03-30T19:33:02Z</dc:date>
    </item>
    <item>
      <title>回复： How does JSL implement a click-to-get variable value in such a graph?</title>
      <link>https://community.jmp.com/t5/Discussions/How-does-JSL-implement-a-click-to-get-variable-value-in-such-a/m-p/742008#M92228</link>
      <description>&lt;P&gt;I can only click.&lt;BR /&gt;Because some columns have small graphics (other columns have large data), it is difficult to point to hover.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2024-03-31_09-59-33.png" style="width: 712px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/62907i017A61F80B46791A/image-size/large?v=v2&amp;amp;px=999" role="button" title="2024-03-31_09-59-33.png" alt="2024-03-31_09-59-33.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 31 Mar 2024 02:11:22 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-does-JSL-implement-a-click-to-get-variable-value-in-such-a/m-p/742008#M92228</guid>
      <dc:creator>lala</dc:creator>
      <dc:date>2024-03-31T02:11:22Z</dc:date>
    </item>
    <item>
      <title>回复： How does JSL implement a click-to-get variable value in such a graph?</title>
      <link>https://community.jmp.com/t5/Discussions/How-does-JSL-implement-a-click-to-get-variable-value-in-such-a/m-p/747918#M92790</link>
      <description>&lt;P class=""&gt;&lt;SPAN class=""&gt;Still want to trigger scripts by clicking on graphics, not by Hover Labels&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;But this graphic changes form, and I don't know how to change to write JSL.&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;I had to go back to the experts.&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;Thanks!&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2024-04-18_20-34-37.png" style="width: 884px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/63466iFACA7C2B385E6F99/image-size/large?v=v2&amp;amp;px=999" role="button" title="2024-04-18_20-34-37.png" alt="2024-04-18_20-34-37.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P class=""&gt;I can only write a script like this, but cannot execute it:&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
p1 = dt &amp;lt;&amp;lt; Graph Builder(
	Size( 632, 1152 ),
	Show Control Panel( 0 ),
	Show Legend( 0 ),
	Variables( X( :weight ), Y( :height ) ),
	Elements(
		Bar( X, Y, Legend( 5 ), Bar Style( "Stacked" ), Response Axis( "X" ), Summary Statistic( "Sum" ) )
	)
);
gp = Report(p1)["Graph Builder",FrameBox(1)]
Eval(
	Eval Expr(
		gp &amp;lt;&amp;lt; Addgraphicsscript(
			Mousetrap(
				{},
				a0 = Expr( iFrame );
				dt &amp;lt;&amp;lt; Select Where( :height == a0 );
				dt &amp;lt;&amp;lt; Select Columns( "height" );
				d3 = dt &amp;lt;&amp;lt; Subset( Output Table( "test" ), Selected Rows( 1 ), columns( height ) );
			)
		)
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 18 Apr 2024 12:56:49 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-does-JSL-implement-a-click-to-get-variable-value-in-such-a/m-p/747918#M92790</guid>
      <dc:creator>lala</dc:creator>
      <dc:date>2024-04-18T12:56:49Z</dc:date>
    </item>
    <item>
      <title>回复： How does JSL implement a click-to-get variable value in such a graph?</title>
      <link>https://community.jmp.com/t5/Discussions/How-does-JSL-implement-a-click-to-get-variable-value-in-such-a/m-p/747932#M92791</link>
      <description>&lt;P&gt;Check the log, there is a missing ; and undefined variable iFrame which you don't need because there is only one frame. The original example embedded the frame number into each script. You don't need the eval(evalexpr(...expr(...)...)) because you no longer have the iFrame to embed in the expr(...)&lt;/P&gt;
&lt;P&gt;MouseTrap is the strangest function in all of JMP. When it is called, it does nothing at all. And you don't have to place it where it will be called, but you DO have to place it in the body of the script, not in a user function outside of the script. MouseTrap is a way to supply a snippet of JSL that will run when the mouse moves.&amp;nbsp; When the mouse moves over the framebox, JMP looks for handler functions in the attached graphic scripts and calls them until one handles the mouse.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Apr 2024 13:57:59 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-does-JSL-implement-a-click-to-get-variable-value-in-such-a/m-p/747932#M92791</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2024-04-18T13:57:59Z</dc:date>
    </item>
    <item>
      <title>回复： How does JSL implement a click-to-get variable value in such a graph?</title>
      <link>https://community.jmp.com/t5/Discussions/How-does-JSL-implement-a-click-to-get-variable-value-in-such-a/m-p/747937#M92792</link>
      <description>&lt;P&gt;Thank Craige!&lt;/P&gt;&lt;P&gt;Yes, one of my code changes was deleted by mistake;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Since my actual generated graph bar graph is very small, using Hover Labels is prone to errors and raises unwanted data.So I still need to trigger the script by clicking on the bar chart.&lt;BR /&gt;I want to modify it by imitating the script given by the expert earlier in this post.But I studied for a long time, still do not know how to modify.You can only post again to ask the experts for help.&lt;BR /&gt;Thanks Experts!&lt;/P&gt;</description>
      <pubDate>Thu, 18 Apr 2024 14:35:44 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-does-JSL-implement-a-click-to-get-variable-value-in-such-a/m-p/747937#M92792</guid>
      <dc:creator>lala</dc:creator>
      <dc:date>2024-04-18T14:35:44Z</dc:date>
    </item>
    <item>
      <title>回复： How does JSL implement a click-to-get variable value in such a graph?</title>
      <link>https://community.jmp.com/t5/Discussions/How-does-JSL-implement-a-click-to-get-variable-value-in-such-a/m-p/747939#M92793</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Interesting example.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2024-04-18_22-39-21.png" style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/63468i5233702634D26803/image-size/large?v=v2&amp;amp;px=999" role="button" title="2024-04-18_22-39-21.png" alt="2024-04-18_22-39-21.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Apr 2024 14:41:25 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-does-JSL-implement-a-click-to-get-variable-value-in-such-a/m-p/747939#M92793</guid>
      <dc:creator>lala</dc:creator>
      <dc:date>2024-04-18T14:41:25Z</dc:date>
    </item>
    <item>
      <title>回复： How does JSL implement a click-to-get variable value in such a graph?</title>
      <link>https://community.jmp.com/t5/Discussions/How-does-JSL-implement-a-click-to-get-variable-value-in-such-a/m-p/748513#M92914</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;frame = (gp &amp;lt;&amp;lt; report)[FrameBox( 1 )];
frame &amp;lt;&amp;lt; Set Graphlet(
	Picture(
		Try( Close( d3, nosave ) );
		Current Data Table( dt );
		d3 = dt &amp;lt;&amp;lt; Subset(
			Output Table( "tt" ),
			Selected Rows( 0 ),
			Rows( dt &amp;lt;&amp;lt; Get Selected Rows() ),
			Selected columns only( 0 )
		);
	),
	Reapply( 1 )
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;This allows mouse clicks and Hover Labels to be used simultaneously.&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;Click can implement the selected line, Hover Labels can extract a subset of the selected line.&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;Thanks!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Apr 2024 02:43:20 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-does-JSL-implement-a-click-to-get-variable-value-in-such-a/m-p/748513#M92914</guid>
      <dc:creator>lala</dc:creator>
      <dc:date>2024-04-23T02:43:20Z</dc:date>
    </item>
    <item>
      <title>回复： How does JSL implement a click-to-get variable value in such a graph?</title>
      <link>https://community.jmp.com/t5/Discussions/How-does-JSL-implement-a-click-to-get-variable-value-in-such-a/m-p/748522#M92918</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2024-04-23_12-38-37.png" style="width: 546px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/63552iE94D4529537E777F/image-size/large?v=v2&amp;amp;px=999" role="button" title="2024-04-23_12-38-37.png" alt="2024-04-23_12-38-37.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Apr 2024 04:41:26 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-does-JSL-implement-a-click-to-get-variable-value-in-such-a/m-p/748522#M92918</guid>
      <dc:creator>lala</dc:creator>
      <dc:date>2024-04-23T04:41:26Z</dc:date>
    </item>
    <item>
      <title>回复： How does JSL implement a click-to-get variable value in such a graph?</title>
      <link>https://community.jmp.com/t5/Discussions/How-does-JSL-implement-a-click-to-get-variable-value-in-such-a/m-p/749991#M93053</link>
      <description>&lt;P&gt;and if you are too lazy to hit the bars -&amp;nbsp; just&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;add a HeatMap plot&lt;/LI&gt;&lt;LI&gt;with disabled x and y variables&lt;/LI&gt;&lt;LI&gt;and transparency set to 0:&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;div class="lia-vid-container video-embed-center"&gt;&lt;div id="lia-vid-6351759869112w1078h540r904" class="lia-video-brightcove-player-container"&gt;&lt;video-js data-video-id="6351759869112" data-account="6058004218001" data-player="default" data-embed="default" class="vjs-fluid" controls="" data-application-id="" style="width: 100%; height: 100%;"&gt;&lt;/video-js&gt;&lt;/div&gt;&lt;script src="https://players.brightcove.net/6058004218001/default_default/index.min.js"&gt;&lt;/script&gt;&lt;script&gt;(function() {  var wrapper = document.getElementById('lia-vid-6351759869112w1078h540r904');  var videoEl = wrapper ? wrapper.querySelector('video-js') : null;  if (videoEl) {     if (window.videojs) {       window.videojs(videoEl).ready(function() {         this.on('loadedmetadata', function() {           this.el().querySelectorAll('.vjs-load-progress div[data-start]').forEach(function(bar) {             bar.setAttribute('role', 'presentation');             bar.setAttribute('aria-hidden', 'true');           });         });       });     }  }})();&lt;/script&gt;&lt;a class="video-embed-link" href="https://community.jmp.com/t5/video/gallerypage/video-id/6351759869112"&gt;(view in My Videos)&lt;/a&gt;&lt;/div&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-SPOILER&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Open( "$SAMPLE_DATA/Big Class.jmp", invisible );
gb = dt &amp;lt;&amp;lt; Graph Builder(

	Variables( X( :weight ), Y( :height ), Group X( :age ), Color( :sex ) ),
	Elements(
		Bar(
			X,
			Y,
			Response Axis( "X" ),
			Summary Statistic( "Sum" )
		),
		Heatmap( Legend( 6 ) )
	),
	SendToReport(
		Dispatch( {"Heatmap"}, "", OutlineBox, {Close( 0 )} ),
		Dispatch( {}, "400", ScaleBox,
			{Legend Model(
				6,
				Base( 0, 0, 0, Item ID( "F", 1 ) ),
				Base( 1, 0, 0, Item ID( "M", 1 ) ),
				Properties( 0, {Transparency( 0 )}, Item ID( "F", 1 ) ),
				Properties( 1, {Transparency( 0 )}, Item ID( "M", 1 ) )
			)}
		))
);
fbs = Report( gb ) &amp;lt;&amp;lt; XPath( "//FrameBox" );

For Each( {fb}, fbs,
	fb &amp;lt;&amp;lt; Set Graphlet( Picture( Caption( Char( myAge = :age[local:_firstRow] ) ) ) )
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;/LI-SPOILER&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Apr 2024 21:54:43 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-does-JSL-implement-a-click-to-get-variable-value-in-such-a/m-p/749991#M93053</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2024-04-25T21:54:43Z</dc:date>
    </item>
  </channel>
</rss>

