<?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 Re: Scripting stacked bar charts in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Scripting-stacked-bar-charts/m-p/39142#M22887</link>
    <description>&lt;P&gt;Here is an example, taken mostly from&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Help==&amp;gt;Scripting Index==&amp;gt;Data Table==&amp;gt;Make Row State Handler&lt;/P&gt;
&lt;P&gt;If you run this code, and then click on one of the bars in he displayed graph, you will see that he row state handler is executed immediatly&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
f = Function( {a}, Print( a ) );
rs = dt &amp;lt;&amp;lt; make row state handler( f );
Graph Builder(
	Size( 533, 448 ),
	Show Control Panel( 0 ),
	Variables( X( :sex ), Y( :height ) ),
	Elements( Bar( X, Y, Legend( 4 ) ) )
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 11 May 2017 18:38:45 GMT</pubDate>
    <dc:creator>txnelson</dc:creator>
    <dc:date>2017-05-11T18:38:45Z</dc:date>
    <item>
      <title>Scripting stacked bar charts</title>
      <link>https://community.jmp.com/t5/Discussions/Scripting-stacked-bar-charts/m-p/39137#M22882</link>
      <description>&lt;DIV&gt;I'm trying to trigger a script from&amp;nbsp;a bar chart. &amp;nbsp;When clicking on one of the segments of the bar JMP highlights the segment &lt;STRONG&gt;&lt;U&gt;and&lt;/U&gt;&lt;/STRONG&gt; its corresponding row in the data table.&amp;nbsp; I then want to trigger a scipr that would read various entries in that row and create another page of plots, basically a drill down in another pane.&amp;nbsp; I can implement the mouse functions as described in the JSL manual and get the coordinates of the mouse.&amp;nbsp; However, I lose the ability to select a cell, and row in the table, when I do this.&amp;nbsp; With a bar chart I don't know how I'd map coordinates to a cell in the plot.&amp;nbsp; In the past I've done this by having the user select the cell and then click a 'drill down' button.&amp;nbsp; That certainly works, but it would be much more elegant if they could just click on the cell and have the drill down plots appear. &amp;nbsp;Is there a way to script this?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thanks!&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Thu, 11 May 2017 16:51:39 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Scripting-stacked-bar-charts/m-p/39137#M22882</guid>
      <dc:creator>vt_sailor</dc:creator>
      <dc:date>2017-05-11T16:51:39Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting stacked bar charts</title>
      <link>https://community.jmp.com/t5/Discussions/Scripting-stacked-bar-charts/m-p/39138#M22883</link>
      <description>&lt;P&gt;I believe the easiest way to do this, is to use a "Make Row State Handler" on the data table. &amp;nbsp;Since clicking on a bar within a Stacked Bar chart, or any other chart, will change the selections in the Row State column, you should be able to pick up the information you need from code you execute in the row state handler.&lt;/P&gt;</description>
      <pubDate>Thu, 11 May 2017 17:07:53 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Scripting-stacked-bar-charts/m-p/39138#M22883</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2017-05-11T17:07:53Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting stacked bar charts</title>
      <link>https://community.jmp.com/t5/Discussions/Scripting-stacked-bar-charts/m-p/39140#M22885</link>
      <description>&lt;P&gt;Thank you for the help. I tried making a row state handler and it almost&lt;BR /&gt;works. Just to try it out I asked it to print the values of one of the&lt;BR /&gt;columns to the log. When I click on the rows in the data table nothing&lt;BR /&gt;happens--until I execute some other statement and then it shows up in the&lt;BR /&gt;log. For example, in the code below, if I execute the first five lines and&lt;BR /&gt;then select various rows in the table nothing shows up in the log. Then,&lt;BR /&gt;when I execute the last line I see everything printed as I would expect.&lt;BR /&gt;Do you need some sort of a 'GO' at the end of the function?&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;names default to here(1);
dt=current data table();

cc=column(dt,"Sum(Mean Ratio)");
f=function({X},print(char(cc[x])));
obj=dt&amp;lt;print("henry");&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Dec 2019 15:39:31 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Scripting-stacked-bar-charts/m-p/39140#M22885</guid>
      <dc:creator>vt_sailor</dc:creator>
      <dc:date>2019-12-30T15:39:31Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting stacked bar charts</title>
      <link>https://community.jmp.com/t5/Discussions/Scripting-stacked-bar-charts/m-p/39142#M22887</link>
      <description>&lt;P&gt;Here is an example, taken mostly from&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Help==&amp;gt;Scripting Index==&amp;gt;Data Table==&amp;gt;Make Row State Handler&lt;/P&gt;
&lt;P&gt;If you run this code, and then click on one of the bars in he displayed graph, you will see that he row state handler is executed immediatly&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
f = Function( {a}, Print( a ) );
rs = dt &amp;lt;&amp;lt; make row state handler( f );
Graph Builder(
	Size( 533, 448 ),
	Show Control Panel( 0 ),
	Variables( X( :sex ), Y( :height ) ),
	Elements( Bar( X, Y, Legend( 4 ) ) )
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 11 May 2017 18:38:45 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Scripting-stacked-bar-charts/m-p/39142#M22887</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2017-05-11T18:38:45Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting stacked bar charts</title>
      <link>https://community.jmp.com/t5/Discussions/Scripting-stacked-bar-charts/m-p/39149#M22893</link>
      <description>Thank you! I rebooted and now everything works as expected. It was a bit&lt;BR /&gt;of a dance to eliminate the returns from the 'release' of the prior&lt;BR /&gt;selected rows but I have that working now.&lt;BR /&gt;&lt;BR /&gt;Thanks again&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 11 May 2017 20:41:53 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Scripting-stacked-bar-charts/m-p/39149#M22893</guid>
      <dc:creator>vt_sailor</dc:creator>
      <dc:date>2017-05-11T20:41:53Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting stacked bar charts</title>
      <link>https://community.jmp.com/t5/Discussions/Scripting-stacked-bar-charts/m-p/239880#M47397</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/8662"&gt;@vt_sailor&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;If you have access to JMP 15.0, you might want to try a new feature called graphlets that automates most (if not all) of the work of creating a drill down workflow based on graph visual elements. Instead of row states like selections, it translates the subsetting criteria into local data filters - so it is captured along in the new graph. This way it is explicit, can be better understood and even further modified.&lt;/P&gt;
&lt;P&gt;Check the answer to&amp;nbsp;&lt;LI-MESSAGE title="drill down in a graph hierarchy" uid="11702" url="https://community.jmp.com/t5/Discussions/drill-down-in-a-graph-hierarchy/m-p/11702#U11702"&gt;&lt;/LI-MESSAGE&gt;&amp;nbsp;&amp;nbsp;for more details.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Dec 2019 15:38:07 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Scripting-stacked-bar-charts/m-p/239880#M47397</guid>
      <dc:creator>nascif_jmp</dc:creator>
      <dc:date>2019-12-30T15:38:07Z</dc:date>
    </item>
  </channel>
</rss>

