<?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: How can I use the combo box to skip over certain columns for legend? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-can-I-use-the-combo-box-to-skip-over-certain-columns-for/m-p/569339#M77993</link>
    <description>&lt;P&gt;Hi Pauldeen, Thanks for your input.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My code is working, but if you click on season in the combo box, it doesn't change the legend.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The two combo options I have right now -&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Click Species - It shows species as legend&lt;/P&gt;
&lt;P&gt;Click Season - It shows subject as legend&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;whereas I want if you click species - it show species as legend and same for season. Hope that clarifies. Thanks!&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="test.PNG" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/47426iDFB3D54BDE9BAE6C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="test.PNG" alt="test.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 17 Nov 2022 14:22:45 GMT</pubDate>
    <dc:creator>AbbWorld27</dc:creator>
    <dc:date>2022-11-17T14:22:45Z</dc:date>
    <item>
      <title>How can I use the combo box to skip over certain columns for legend?</title>
      <link>https://community.jmp.com/t5/Discussions/How-can-I-use-the-combo-box-to-skip-over-certain-columns-for/m-p/568893#M77948</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to only display certain columns in the combo box as legends, but the current code I have takes the column one by one. Is there any way in which I can skip over certain columns?&lt;/P&gt;
&lt;P&gt;For example, in this case, I only want :subject &amp;amp; :season in the legend list. Here's my code:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );

dt = Open( "$SAMPLE_DATA/Animals.jmp", invisible );
legend_list = {"subject", "season"};

gb_default = Expr(
	Graph Builder(
		Size( 544, 356 ),
		Show Control Panel( 0 ),
		Legend Position( "Bottom" ),
		Fit to Window( "Off" ),
		Variables( X( :species ), Y( :miles ), Color( :subject ) ),
		Elements( Points( X, Y, Legend( 14 ) ) ),
		SendToReport( Dispatch( {}, "400", LegendBox, {Orientation( "Horizontal" ), Sides( "Left" )} ) )
	)
);


gb_change = Expr(
	Graph Builder(
		Size( 544, 356 ),
		Show Control Panel( 0 ),
		Legend Position( "Bottom" ),
		Fit to Window( "Off" ),
		Variables( X( :species ), Y( :miles ), Color( Column( dt, ycol ) ) ),
		Elements( Points( X, Y, Legend( 14 ) ) ),
		SendToReport( Dispatch( {}, "400", LegendBox, {Orientation( "Horizontal" ), Sides( "Left" )} ) )
	)
);

nw = New Window( "Animals Monitoring ",
	gb = gb_default;
	lbcontent = Lineup Box( N Col( 10 ),
		Spacer Box( Size( 1, 0 ) ),
		Text Box( "Color: ", &amp;lt;&amp;lt;Set Font Size( 10 ) ),
		ycb = Combo Box(
			legend_list,
			&amp;lt;&amp;lt;Set( 1 ),
			&amp;lt;&amp;lt;Set Function(
				Function( {},
					ycol = ycb &amp;lt;&amp;lt; Get;
					gb &amp;lt;&amp;lt; delete;
					nw &amp;lt;&amp;lt; Prepend( gb = gb_change );
				)
			)
		)
	);
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Thanks for your help in advance.&lt;/P&gt;</description>
      <pubDate>Sun, 11 Jun 2023 11:29:19 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-can-I-use-the-combo-box-to-skip-over-certain-columns-for/m-p/568893#M77948</guid>
      <dc:creator>AbbWorld27</dc:creator>
      <dc:date>2023-06-11T11:29:19Z</dc:date>
    </item>
    <item>
      <title>Re: How can I use the combo box to skip over certain columns for legend?</title>
      <link>https://community.jmp.com/t5/Discussions/How-can-I-use-the-combo-box-to-skip-over-certain-columns-for/m-p/568979#M77958</link>
      <description>&lt;P&gt;You missed a ) at the end of your example script. Please also use the &amp;lt;JSL&amp;gt; tag in the insert menu to paste code. This is what it should look like:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );

dt = Open( "$SAMPLE_DATA/Animals.jmp", invisible);;
legend_list = {"subject","season"};

gb_default = Expr(
	Graph Builder(
		Size( 544, 356 ),
		Show Control Panel( 0 ),
		Legend Position( "Bottom" ),
		Fit to Window( "Off" ),
		Variables( X( :species ), Y( :miles ), Color( :subject ) ),
		Elements( Points( X, Y, Legend( 14 ) ) ),
		SendToReport( Dispatch( {}, "400", LegendBox, {Orientation( "Horizontal" ), Sides( "Left" )} ) )
	)
);


gb_change = Expr(
	Graph Builder(
		Size( 544, 356 ),
		Show Control Panel( 0 ),
		Legend Position( "Bottom" ),
		Fit to Window( "Off" ),
		Variables( X( :species ), Y( :miles ), Color( Column( dt, ycol ) ) ),
		Elements( Points( X, Y, Legend( 14 ) ) ),
		SendToReport( Dispatch( {}, "400", LegendBox, {Orientation( "Horizontal" ), Sides( "Left" )} ) )
	)
);

nw = New Window( "Animals Monitoring ",
	gb = gb_default;
	lbcontent = Lineup Box( N Col( 10 ),
		Spacer Box( Size( 1, 0 ) ),
		Text Box( "Color: ", &amp;lt;&amp;lt;Set Font Size( 10 ) ),
		ycb = Combo Box(
			legend_list,
			&amp;lt;&amp;lt;Set( 1 ),
			&amp;lt;&amp;lt;Set Function(
				Function( {},
					ycol = ycb &amp;lt;&amp;lt; Get;
					gb &amp;lt;&amp;lt; delete;
					nw &amp;lt;&amp;lt; Prepend( gb = gb_change );
				)
			)
		)
	);
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;As far as I can tell, you code works...so what is your question exactly?&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="pauldeen_0-1668434166939.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/47302i31E92656B54DF95B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="pauldeen_0-1668434166939.png" alt="pauldeen_0-1668434166939.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Nov 2022 13:56:14 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-can-I-use-the-combo-box-to-skip-over-certain-columns-for/m-p/568979#M77958</guid>
      <dc:creator>pauldeen</dc:creator>
      <dc:date>2022-11-14T13:56:14Z</dc:date>
    </item>
    <item>
      <title>Re: How can I use the combo box to skip over certain columns for legend?</title>
      <link>https://community.jmp.com/t5/Discussions/How-can-I-use-the-combo-box-to-skip-over-certain-columns-for/m-p/569339#M77993</link>
      <description>&lt;P&gt;Hi Pauldeen, Thanks for your input.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My code is working, but if you click on season in the combo box, it doesn't change the legend.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The two combo options I have right now -&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Click Species - It shows species as legend&lt;/P&gt;
&lt;P&gt;Click Season - It shows subject as legend&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;whereas I want if you click species - it show species as legend and same for season. Hope that clarifies. Thanks!&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="test.PNG" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/47426iDFB3D54BDE9BAE6C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="test.PNG" alt="test.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Nov 2022 14:22:45 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-can-I-use-the-combo-box-to-skip-over-certain-columns-for/m-p/569339#M77993</guid>
      <dc:creator>AbbWorld27</dc:creator>
      <dc:date>2022-11-17T14:22:45Z</dc:date>
    </item>
    <item>
      <title>Re: How can I use the combo box to skip over certain columns for legend?</title>
      <link>https://community.jmp.com/t5/Discussions/How-can-I-use-the-combo-box-to-skip-over-certain-columns-for/m-p/569358#M77996</link>
      <description>&lt;P&gt;How about using the column switcher?&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );

dt = Open( "$SAMPLE_DATA/Animals.jmp", invisible);;
legend_list = {"subject","season"};
Graph Builder(
	Size( 544, 356 ),
	Show Control Panel( 0 ),
	Legend Position( "Bottom" ),
	Fit to Window( "Off" ),
	Variables( X( :species ), Y( :miles ), Color( :subject ) ),
	Elements( Points( X, Y, Legend( 14 ) ) ),
	Column Switcher( :subject, legend_list )
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 15 Nov 2022 12:59:00 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-can-I-use-the-combo-box-to-skip-over-certain-columns-for/m-p/569358#M77996</guid>
      <dc:creator>pauldeen</dc:creator>
      <dc:date>2022-11-15T12:59:00Z</dc:date>
    </item>
    <item>
      <title>Re: How can I use the combo box to skip over certain columns for legend?</title>
      <link>https://community.jmp.com/t5/Discussions/How-can-I-use-the-combo-box-to-skip-over-certain-columns-for/m-p/569944#M78038</link>
      <description>&lt;P&gt;Should have mentioned that I did try using the column switcher, but I also will be including another combo box in the tool&lt;/P&gt;
&lt;P&gt;One combo box - for changing x-axis&lt;/P&gt;
&lt;P&gt;One combo box - for changing legend/color&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The column switcher isn't doing a good job at that, as it keeps on repeating for me.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="desktop.PNG" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/47427iB8733CDF38F844A2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="desktop.PNG" alt="desktop.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Nov 2022 14:23:57 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-can-I-use-the-combo-box-to-skip-over-certain-columns-for/m-p/569944#M78038</guid>
      <dc:creator>AbbWorld27</dc:creator>
      <dc:date>2022-11-17T14:23:57Z</dc:date>
    </item>
    <item>
      <title>Re: How can I use the combo box to skip over certain columns for legend?</title>
      <link>https://community.jmp.com/t5/Discussions/How-can-I-use-the-combo-box-to-skip-over-certain-columns-for/m-p/570560#M78068</link>
      <description>&lt;P&gt;Two column switchers look pretty good to me:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );

dt = Open( "$SAMPLE_DATA/Animals.jmp", invisible);;
legend_list = {"subject","season"};
Graph Builder(
	Size( 544, 356 ),
	Show Control Panel( 0 ),
	Legend Position( "Bottom" ),
	Fit to Window( "Off" ),
	Variables( X( :species ), Y( :miles ), Color( :subject ) ),
	Elements( Points( X, Y, Legend( 14 ) ) ),
	Column Switcher( :subject, legend_list, Title( "Column Switcher Legend" ) ),
	Column Switcher( :species, {:species, :season}, Title( "Column Switcher X" ) )
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;In this examples some clashes occur as they are using the same variable Season but that is handled gracefully with an error message and will probably not happen in your real dataset.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="pauldeen_0-1668693063674.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/47424i23A26E78DABED4AA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="pauldeen_0-1668693063674.png" alt="pauldeen_0-1668693063674.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Nov 2022 13:51:48 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-can-I-use-the-combo-box-to-skip-over-certain-columns-for/m-p/570560#M78068</guid>
      <dc:creator>pauldeen</dc:creator>
      <dc:date>2022-11-17T13:51:48Z</dc:date>
    </item>
  </channel>
</rss>

