<?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: Shared Column Switcher for multiple graphs in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Shared-Column-Switcher-for-multiple-graphs/m-p/41474#M24210</link>
    <description>&lt;P&gt;Here is a script that works on JMP 13&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Blood Pressure.jmp" );
nw = New Window( "test",
	ob = Outline Box( "Var Charts",
		MyHLB = H List Box(
			vc = Variability Chart( Y( :BP 8M ), X( :Subject ), Std Dev Chart( 0 ) ),
			vc2 = Variability Chart( Y( :BP 8M ), X( :Subject ), Std Dev Chart( 0 ) )
	
		)
	)
);
cs = vc &amp;lt;&amp;lt; Column Switcher( :BP 8M, {:BP 8M, :BP 12M, :BP 6M, :BP 8W, :BP 12W, :BP 6W, :BP 8F, :BP 12F, :BP 6F} );

nw["Var Charts"][listboxbox(1)] &amp;lt;&amp;lt; set script(
	VarList = {:BP 8M,:BP 12M,:BP 6M,:BP 8W,:BP 12W,:BP 6W,:BP 8F,:BP 12F,:BP 6F};
	CurVar = word(2,char(vc2&amp;lt;&amp;lt;get script),":)");
	Eval( 
		Substitute( 
			Expr( cs2 = vc2 &amp;lt;&amp;lt; Column Switcher( __CurVar__, varlist ) 
			), 
			Expr( __CurVar__ ), Parse( ":" || CurVar ) 		
		) 	
	);
	SwitchVar = Char((nw["Var Charts"][listboxbox(1)] &amp;lt;&amp;lt; get selected)[1]);
	For(i=1,i&amp;lt;=N items(VarList),i++,
		If(SwitchVar==Char(VarList[i]),
			Break()
		)
	);
	nw["Var Charts"][listboxbox(2)]&amp;lt;&amp;lt;set selected(i);
	cs2 &amp;lt;&amp;lt; remove column switcher;
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I tested it on JMP 11.1, and it works only for the first selection, then the link to the second Variability Chart gets lost. &amp;nbsp;I assume this is a JMP bug that was fixed in JMP 12 or 13. &amp;nbsp;However, all is not lost. &amp;nbsp;What you can do, is to change my code to not generate a second Column Switcher and then use it to change the second chart, but instead, to delete the VC2 object completly, and then rebuild the chart and to append it to the MyHLB object.&lt;/P&gt;</description>
    <pubDate>Tue, 04 Jul 2017 15:54:02 GMT</pubDate>
    <dc:creator>txnelson</dc:creator>
    <dc:date>2017-07-04T15:54:02Z</dc:date>
    <item>
      <title>Shared Column Switcher for multiple graphs</title>
      <link>https://community.jmp.com/t5/Discussions/Shared-Column-Switcher-for-multiple-graphs/m-p/41462#M24198</link>
      <description>&lt;P&gt;Is there any way to have one shared column switcher for multiple graphs?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example, I would like to have 1 column switcher to view two different variability charts...&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thank you for your help in advance.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jul 2017 03:59:17 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Shared-Column-Switcher-for-multiple-graphs/m-p/41462#M24198</guid>
      <dc:creator>ku8809no</dc:creator>
      <dc:date>2017-07-04T03:59:17Z</dc:date>
    </item>
    <item>
      <title>Re: Shared Column Switcher for multiple graphs</title>
      <link>https://community.jmp.com/t5/Discussions/Shared-Column-Switcher-for-multiple-graphs/m-p/41463#M24199</link>
      <description>The answer is, probably.  There is typically a trigger that can be used to determine that something has changed within the first platform, based upon the column switcher, and from that, JSL can be then used to change the columns in the other platforms.  If you can provide what JMP platforms you are looking to be using, then the potential triggers can be looked into.</description>
      <pubDate>Tue, 04 Jul 2017 04:14:20 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Shared-Column-Switcher-for-multiple-graphs/m-p/41463#M24199</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2017-07-04T04:14:20Z</dc:date>
    </item>
    <item>
      <title>Re: Shared Column Switcher for multiple graphs</title>
      <link>https://community.jmp.com/t5/Discussions/Shared-Column-Switcher-for-multiple-graphs/m-p/41465#M24201</link>
      <description>Thanks Jim..&lt;BR /&gt;I am not 100% clear what you mean by "platforms". I am using JSL scripts to plot two variability charts. I was able to add two column switcher to both variability charts (1 each), but I would like to have just one that controls both charts.&lt;BR /&gt;&lt;BR /&gt;V List Box(&lt;BR /&gt;dt = Variability Chart(Set Title("Variability Chart 1"),Y(:colA),X(:colB)), dt = Variability Chart(Set Title("Variability Chart 2"),Y(:colA),X(:colB)))</description>
      <pubDate>Tue, 04 Jul 2017 05:53:48 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Shared-Column-Switcher-for-multiple-graphs/m-p/41465#M24201</guid>
      <dc:creator>ku8809no</dc:creator>
      <dc:date>2017-07-04T05:53:48Z</dc:date>
    </item>
    <item>
      <title>Re: Shared Column Switcher for multiple graphs</title>
      <link>https://community.jmp.com/t5/Discussions/Shared-Column-Switcher-for-multiple-graphs/m-p/41466#M24202</link>
      <description>also, i am using JMP 11.1 on Window</description>
      <pubDate>Tue, 04 Jul 2017 05:56:41 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Shared-Column-Switcher-for-multiple-graphs/m-p/41466#M24202</guid>
      <dc:creator>ku8809no</dc:creator>
      <dc:date>2017-07-04T05:56:41Z</dc:date>
    </item>
    <item>
      <title>Re: Shared Column Switcher for multiple graphs</title>
      <link>https://community.jmp.com/t5/Discussions/Shared-Column-Switcher-for-multiple-graphs/m-p/41474#M24210</link>
      <description>&lt;P&gt;Here is a script that works on JMP 13&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Blood Pressure.jmp" );
nw = New Window( "test",
	ob = Outline Box( "Var Charts",
		MyHLB = H List Box(
			vc = Variability Chart( Y( :BP 8M ), X( :Subject ), Std Dev Chart( 0 ) ),
			vc2 = Variability Chart( Y( :BP 8M ), X( :Subject ), Std Dev Chart( 0 ) )
	
		)
	)
);
cs = vc &amp;lt;&amp;lt; Column Switcher( :BP 8M, {:BP 8M, :BP 12M, :BP 6M, :BP 8W, :BP 12W, :BP 6W, :BP 8F, :BP 12F, :BP 6F} );

nw["Var Charts"][listboxbox(1)] &amp;lt;&amp;lt; set script(
	VarList = {:BP 8M,:BP 12M,:BP 6M,:BP 8W,:BP 12W,:BP 6W,:BP 8F,:BP 12F,:BP 6F};
	CurVar = word(2,char(vc2&amp;lt;&amp;lt;get script),":)");
	Eval( 
		Substitute( 
			Expr( cs2 = vc2 &amp;lt;&amp;lt; Column Switcher( __CurVar__, varlist ) 
			), 
			Expr( __CurVar__ ), Parse( ":" || CurVar ) 		
		) 	
	);
	SwitchVar = Char((nw["Var Charts"][listboxbox(1)] &amp;lt;&amp;lt; get selected)[1]);
	For(i=1,i&amp;lt;=N items(VarList),i++,
		If(SwitchVar==Char(VarList[i]),
			Break()
		)
	);
	nw["Var Charts"][listboxbox(2)]&amp;lt;&amp;lt;set selected(i);
	cs2 &amp;lt;&amp;lt; remove column switcher;
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I tested it on JMP 11.1, and it works only for the first selection, then the link to the second Variability Chart gets lost. &amp;nbsp;I assume this is a JMP bug that was fixed in JMP 12 or 13. &amp;nbsp;However, all is not lost. &amp;nbsp;What you can do, is to change my code to not generate a second Column Switcher and then use it to change the second chart, but instead, to delete the VC2 object completly, and then rebuild the chart and to append it to the MyHLB object.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jul 2017 15:54:02 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Shared-Column-Switcher-for-multiple-graphs/m-p/41474#M24210</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2017-07-04T15:54:02Z</dc:date>
    </item>
    <item>
      <title>Re: Shared Column Switcher for multiple graphs</title>
      <link>https://community.jmp.com/t5/Discussions/Shared-Column-Switcher-for-multiple-graphs/m-p/41481#M24217</link>
      <description>&lt;P&gt;Jim, Thank you so much. Let me work on this and i will let you know how your suggested workaround turns out!&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jul 2017 19:42:04 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Shared-Column-Switcher-for-multiple-graphs/m-p/41481#M24217</guid>
      <dc:creator>ku8809no</dc:creator>
      <dc:date>2017-07-04T19:42:04Z</dc:date>
    </item>
    <item>
      <title>Re: Shared Column Switcher for multiple graphs</title>
      <link>https://community.jmp.com/t5/Discussions/Shared-Column-Switcher-for-multiple-graphs/m-p/41520#M24240</link>
      <description>Jim,&lt;BR /&gt;&lt;BR /&gt;Thanks to your huge help, I was able to resolve the issue.&lt;BR /&gt;Rather than using your suggested workaround, I resolved the issue by addressing the bug directly.&lt;BR /&gt;Based on the error messaged, it looked to me that the bug on JMP11 was that the scriptable object gets "deleted" when you use Column Switcher.&lt;BR /&gt;So i just added readdressing line to reassign the object to the object name after the column has been switched.&lt;BR /&gt;&lt;BR /&gt;For example,&lt;BR /&gt;&lt;BR /&gt;nw["Var Charts"][listboxbox(2)]&amp;lt;&amp;lt;set selected(i);&lt;BR /&gt;vc2 =nw["Var Charts"][outline box("chart name")] &amp;lt;&amp;lt; Get scriptable object;&lt;BR /&gt;cs2 &amp;lt;&amp;lt; remove column switcher;</description>
      <pubDate>Wed, 05 Jul 2017 23:35:34 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Shared-Column-Switcher-for-multiple-graphs/m-p/41520#M24240</guid>
      <dc:creator>ku8809no</dc:creator>
      <dc:date>2017-07-05T23:35:34Z</dc:date>
    </item>
    <item>
      <title>Re: Shared Column Switcher for multiple graphs</title>
      <link>https://community.jmp.com/t5/Discussions/Shared-Column-Switcher-for-multiple-graphs/m-p/41521#M24241</link>
      <description>&lt;P&gt;Brilliant!&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jul 2017 23:38:36 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Shared-Column-Switcher-for-multiple-graphs/m-p/41521#M24241</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2017-07-05T23:38:36Z</dc:date>
    </item>
    <item>
      <title>Re: Shared Column Switcher for multiple graphs</title>
      <link>https://community.jmp.com/t5/Discussions/Shared-Column-Switcher-for-multiple-graphs/m-p/45504#M26011</link>
      <description>&lt;P&gt;I just want to highlight how powerful that particular use of &amp;lt;&amp;lt; set script() is. I had been wondering for awhile how to get JMP to do something when changing selections in the column switcher, and this fits the bill perfectly.&lt;/P&gt;&lt;PRE class=" language-jsl"&gt;&lt;CODE class="  language-jsl"&gt;nw&lt;SPAN class="token punctuation"&gt;[&lt;/SPAN&gt;&lt;SPAN class="token string"&gt;"Var Charts"&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;]&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;[&lt;/SPAN&gt;listboxbox&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token number"&gt;1&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;]&lt;/SPAN&gt; &lt;SPAN class="token operator"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;&amp;lt;&lt;/SPAN&gt; set script&lt;SPAN class="token punctuation"&gt;(...)&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 04 Oct 2017 21:19:56 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Shared-Column-Switcher-for-multiple-graphs/m-p/45504#M26011</guid>
      <dc:creator>mikedriscoll</dc:creator>
      <dc:date>2017-10-04T21:19:56Z</dc:date>
    </item>
    <item>
      <title>Re: Shared Column Switcher for multiple graphs</title>
      <link>https://community.jmp.com/t5/Discussions/Shared-Column-Switcher-for-multiple-graphs/m-p/106597#M39035</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it possible to do that without script?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank in advance for responses&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jan 2019 10:21:12 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Shared-Column-Switcher-for-multiple-graphs/m-p/106597#M39035</guid>
      <dc:creator>Aline</dc:creator>
      <dc:date>2019-01-16T10:21:12Z</dc:date>
    </item>
    <item>
      <title>Re: Shared Column Switcher for multiple graphs</title>
      <link>https://community.jmp.com/t5/Discussions/Shared-Column-Switcher-for-multiple-graphs/m-p/283875#M54842</link>
      <description>&lt;P&gt;I'm happy to report that JMP 16 will support using a single Column Switcher across multiple platforms.&lt;/P&gt;</description>
      <pubDate>Mon, 03 Aug 2020 14:58:34 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Shared-Column-Switcher-for-multiple-graphs/m-p/283875#M54842</guid>
      <dc:creator>Jeff_Perkinson</dc:creator>
      <dc:date>2020-08-03T14:58:34Z</dc:date>
    </item>
    <item>
      <title>Re: Shared Column Switcher for multiple graphs</title>
      <link>https://community.jmp.com/t5/Discussions/Shared-Column-Switcher-for-multiple-graphs/m-p/723547#M90559</link>
      <description>&lt;P&gt;For others that are interested, here is the JMPer Cable showing the Link Platform for Column Switcher&amp;nbsp;&lt;A href="https://community.jmp.com/t5/JMPer-Cable/New-features-in-the-Column-Switcher-for-JMP-16/ba-p/365930" target="_blank"&gt;https://community.jmp.com/t5/JMPer-Cable/New-features-in-the-Column-Switcher-for-JMP-16/ba-p/365930&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Feb 2024 22:17:49 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Shared-Column-Switcher-for-multiple-graphs/m-p/723547#M90559</guid>
      <dc:creator>Luis_HC</dc:creator>
      <dc:date>2024-02-09T22:17:49Z</dc:date>
    </item>
  </channel>
</rss>

