<?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: Graph Builder JSL commands on Elements in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Graph-Builder-JSL-commands-on-Elements/m-p/280240#M54311</link>
    <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/2996"&gt;@tom_abramov&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tooka a different long path, like Jim,&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/2687"&gt;@txnelson&lt;/a&gt;&amp;nbsp;.&amp;nbsp; Then I had to laugh, because JMP has a simple solution with the message&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Update Element() sent to the GraphBuilderBox()&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Open( "$SAMPLE_DATA/Big Class.jmp" );
gb = Graph Builder(
	Size( 465, 278 ),
	Show Control Panel( 0 ),
	Fit to Window( "Off" ),
	Variables( X( :age ), Y( :height ), Y( :weight ) ),
	Elements( Position( 1, 1 ), Line( X, Y(1), Legend( 1 ) ) ),
	Elements( Position( 1, 2 ), Bar( X, Y(2), Legend( 2 ) ) )
);


gbb = report(gb)[GraphBuilderBox(1)];
gbb&amp;lt;&amp;lt; Update Element(1,2,1, {Label("Label by Value")});


/* //hard way not recommended

//must be done while No Labels is specified

gb&amp;lt;&amp;lt; show Control Panel(1);
so_bar = report(gb)[OutlineBox("Bar[weight]")];

cb_label = so_bar &amp;lt;&amp;lt; xpath("//ComboBox/ComboBoxItem[text()='No Labels']/..");

cb_label &amp;lt;&amp;lt; set(2);

gb &amp;lt;&amp;lt; show Control panel(0);

*/&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;However, I am running into an issue by adding variable :weight which is easy to do, but by default, GraphBuilder make another bar chart element.&amp;nbsp; and I get into some screwy issues, several JMP&amp;nbsp; exceptions.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I will add a wish list item that JMP allows a Change To() message for elemnets, not just Add Element and Remove Element.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'll add to the post when/if I figure it out.&lt;/P&gt;</description>
    <pubDate>Sun, 19 Jul 2020 19:28:01 GMT</pubDate>
    <dc:creator>gzmorgan0</dc:creator>
    <dc:date>2020-07-19T19:28:01Z</dc:date>
    <item>
      <title>Graph Builder JSL commands on Elements</title>
      <link>https://community.jmp.com/t5/Discussions/Graph-Builder-JSL-commands-on-Elements/m-p/280051#M54289</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I can't find the syntax of editing (add element/remove element/add labels to element) graph builder elements &lt;U&gt;after&lt;/U&gt; the graph is ready.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Open( "$SAMPLE_DATA/Big Class.jmp" );
gb = Graph Builder(
	Size( 465, 278 ),
	Show Control Panel( 0 ),
	Fit to Window( "Off" ),
	Variables( X( :age ), Y( :height ), Y( :weight ) ),
	Elements( Position( 1, 1 ), Line( X, Y, Legend( 1 ) ) ),
	Elements( Position( 1, 2 ), Bar( X, Y, Legend( 2 ) ) )
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;//gb[Elements(2)] &amp;lt;&amp;lt;&amp;nbsp;Label( "Label by Value" );// ?? // What is the sytax fo this?&lt;/P&gt;&lt;P&gt;//gb &amp;lt;&amp;lt; Add Element(Position( 1, 3 ), Line( X, Y, Legend( 3 ) ));// ?? //Y have to be weight&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 23:32:35 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Graph-Builder-JSL-commands-on-Elements/m-p/280051#M54289</guid>
      <dc:creator>tom_abramov</dc:creator>
      <dc:date>2023-06-09T23:32:35Z</dc:date>
    </item>
    <item>
      <title>Re: Graph Builder JSL commands on Elements</title>
      <link>https://community.jmp.com/t5/Discussions/Graph-Builder-JSL-commands-on-Elements/m-p/280084#M54297</link>
      <description>&lt;P&gt;I don't think it can be done.&amp;nbsp; What you would have to be able to do, is to pass to the FrameBox() in the output, a Segment, such as a Bar Seg, or a Line Seg.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
Open( "$SAMPLE_DATA/Big Class.jmp" );
obj = Graph Builder( Variables( X( :age ), Y( :weight ) ), Elements( Bar( X, Y ) ) );
frame = Report( obj )[FrameBox( 1 )];
seg = (frame &amp;lt;&amp;lt; Find Seg( "Bar Seg" ));
seg &amp;lt;&amp;lt; Get Width Proportion();
seg &amp;lt;&amp;lt; Set Fill Color( "Green" );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;You can interactively change the segments, in the Customize selection when you right click on the graph, and there is no label segment.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="cum2.PNG" style="width: 732px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/25462i631D6AFE5C4303B1/image-size/large?v=v2&amp;amp;px=999" role="button" title="cum2.PNG" alt="cum2.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 19 Jul 2020 12:07:38 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Graph-Builder-JSL-commands-on-Elements/m-p/280084#M54297</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2020-07-19T12:07:38Z</dc:date>
    </item>
    <item>
      <title>Re: Graph Builder JSL commands on Elements</title>
      <link>https://community.jmp.com/t5/Discussions/Graph-Builder-JSL-commands-on-Elements/m-p/280124#M54305</link>
      <description>&lt;P&gt;Bad for me...&lt;/P&gt;&lt;P&gt;Thank you Jim.&lt;/P&gt;</description>
      <pubDate>Sun, 19 Jul 2020 15:29:04 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Graph-Builder-JSL-commands-on-Elements/m-p/280124#M54305</guid>
      <dc:creator>tom_abramov</dc:creator>
      <dc:date>2020-07-19T15:29:04Z</dc:date>
    </item>
    <item>
      <title>Re: Graph Builder JSL commands on Elements</title>
      <link>https://community.jmp.com/t5/Discussions/Graph-Builder-JSL-commands-on-Elements/m-p/280209#M54308</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/2996"&gt;@tom_abramov&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A thought just popped into my head, and there is one way around this......This is a solution I have used many times for different reasons.&amp;nbsp; What I suggest you do, is to write your code, so that what you do, is when you need to add the elements that you are referencing, you simply delete the entire graph and recreate it in it's place.&amp;nbsp; The way JMP handles refresh, it will probably not show the change when the graph is deleted.&amp;nbsp; It will probably just see that the graph has changed.&lt;/P&gt;
&lt;P&gt;The code below illustrates my idea.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;names default to here(1);
Open( "$SAMPLE_DATA/Big Class.jmp" );
new window("Test", vlb=vlistbox());
vlb&amp;lt;&amp;lt; append(gb = Graph Builder(
	Size( 465, 278 ),
	Show Control Panel( 0 ),
	Fit to Window( "Off" ),
	Variables( X( :age ), Y( :height ), Y( :weight ) ),
	Elements( Position( 1, 1 ), Line( X, Y, Legend( 1 ) ) ),
	Elements( Position( 1, 2 ), Bar( X, Y, Legend( 2 ) ) )
));

wait(5);
gb &amp;lt;&amp;lt; delete;
vlb &amp;lt;&amp;lt; append(gb = Graph Builder(
	Size( 465, 278 ),
	Show Control Panel( 0 ),
	Fit to Window( "Off" ),
	Variables( X( :age ), Y( :height ), Y( :weight ) ),
	Elements( Position( 1, 1 ), Line( X, Y, Legend( 1 ) ) ),
	Elements(
		Position( 1, 2 ),
		Bar( X, Y, Legend( 2 ), Label( "Label by Value" ) )
	)
));&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 19 Jul 2020 17:13:54 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Graph-Builder-JSL-commands-on-Elements/m-p/280209#M54308</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2020-07-19T17:13:54Z</dc:date>
    </item>
    <item>
      <title>Re: Graph Builder JSL commands on Elements</title>
      <link>https://community.jmp.com/t5/Discussions/Graph-Builder-JSL-commands-on-Elements/m-p/280240#M54311</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/2996"&gt;@tom_abramov&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tooka a different long path, like Jim,&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/2687"&gt;@txnelson&lt;/a&gt;&amp;nbsp;.&amp;nbsp; Then I had to laugh, because JMP has a simple solution with the message&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Update Element() sent to the GraphBuilderBox()&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Open( "$SAMPLE_DATA/Big Class.jmp" );
gb = Graph Builder(
	Size( 465, 278 ),
	Show Control Panel( 0 ),
	Fit to Window( "Off" ),
	Variables( X( :age ), Y( :height ), Y( :weight ) ),
	Elements( Position( 1, 1 ), Line( X, Y(1), Legend( 1 ) ) ),
	Elements( Position( 1, 2 ), Bar( X, Y(2), Legend( 2 ) ) )
);


gbb = report(gb)[GraphBuilderBox(1)];
gbb&amp;lt;&amp;lt; Update Element(1,2,1, {Label("Label by Value")});


/* //hard way not recommended

//must be done while No Labels is specified

gb&amp;lt;&amp;lt; show Control Panel(1);
so_bar = report(gb)[OutlineBox("Bar[weight]")];

cb_label = so_bar &amp;lt;&amp;lt; xpath("//ComboBox/ComboBoxItem[text()='No Labels']/..");

cb_label &amp;lt;&amp;lt; set(2);

gb &amp;lt;&amp;lt; show Control panel(0);

*/&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;However, I am running into an issue by adding variable :weight which is easy to do, but by default, GraphBuilder make another bar chart element.&amp;nbsp; and I get into some screwy issues, several JMP&amp;nbsp; exceptions.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I will add a wish list item that JMP allows a Change To() message for elemnets, not just Add Element and Remove Element.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'll add to the post when/if I figure it out.&lt;/P&gt;</description>
      <pubDate>Sun, 19 Jul 2020 19:28:01 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Graph-Builder-JSL-commands-on-Elements/m-p/280240#M54311</guid>
      <dc:creator>gzmorgan0</dc:creator>
      <dc:date>2020-07-19T19:28:01Z</dc:date>
    </item>
    <item>
      <title>Re: Graph Builder JSL commands on Elements</title>
      <link>https://community.jmp.com/t5/Discussions/Graph-Builder-JSL-commands-on-Elements/m-p/280242#M54312</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/2996"&gt;@tom_abramov&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It was me, a user syntax error.&amp;nbsp; Her you go.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Open( "$SAMPLE_DATA/Big Class.jmp" );
gb = Graph Builder(
	Size( 465, 278 ),
	Show Control Panel( 0 ),
	Fit to Window( "Off" ),
	Variables( X( :age ), Y( :height ), Y( :weight ) ),
	Elements( Position( 1, 1 ), Line( X, Y(1), Legend( 1 ) ) ),
	Elements( Position( 1, 2 ), Bar( X, Y(2), Legend( 2 ) ) )
);


gbb = report(gb)[GraphBuilderBox(1)];
gbb&amp;lt;&amp;lt; Update Element(1,2,1, {Label("Label by Value")});


report(gb)[GraphBuilderBox(1)] &amp;lt;&amp;lt; Add Variable({:weight, Role("Y"), Method("insert")}); //creates a bar chart
gbb = report(gb)[GraphBuilderBox(1)];
gbb &amp;lt;&amp;lt; Add Element( 1, 3 , {Type("Line"), X, Y}, Legend( 3 ) ); 
gbb &amp;lt;&amp;lt; Remove Element( 1, 3 , 1 );  //remove bar chart
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 19 Jul 2020 19:37:37 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Graph-Builder-JSL-commands-on-Elements/m-p/280242#M54312</guid>
      <dc:creator>gzmorgan0</dc:creator>
      <dc:date>2020-07-19T19:37:37Z</dc:date>
    </item>
    <item>
      <title>Re: Graph Builder JSL commands on Elements</title>
      <link>https://community.jmp.com/t5/Discussions/Graph-Builder-JSL-commands-on-Elements/m-p/280415#M54330</link>
      <description>&lt;P&gt;Thank you very much both of you.&lt;/P&gt;&lt;P&gt;"GraphBuilderBox" is the keyword...&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jul 2020 11:39:50 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Graph-Builder-JSL-commands-on-Elements/m-p/280415#M54330</guid>
      <dc:creator>tom_abramov</dc:creator>
      <dc:date>2020-07-20T11:39:50Z</dc:date>
    </item>
    <item>
      <title>Re: Graph Builder JSL commands on Elements</title>
      <link>https://community.jmp.com/t5/Discussions/Graph-Builder-JSL-commands-on-Elements/m-p/695406#M88048</link>
      <description>&lt;P&gt;Since Jmp17 :)&lt;/img&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Open( "$SAMPLE_DATA/Big Class.jmp" );
gb = Graph Builder(
	Size( 465, 278 ),
	Show Control Panel( 0 ),
	Fit to Window( "Off" ),
	Variables( X( :age ), Y( :height ), Y( :weight ) ),
	Elements( Position( 1, 1 ), Line( X, Y(1), Legend( 1 ) ) ),
	Elements( Position( 1, 2 ), Bar( X, Y(2), Legend( 2 ) ) )
);

gb &amp;lt;&amp;lt; Update Element(1,2,1, {Label("Label by Value")});

gb &amp;lt;&amp;lt; Add Variable({:weight, Role("Y"), Method("insert")}); //creates a bar chart

gb &amp;lt;&amp;lt; Add Element( 1, 3 , {Type("Line"), X, Y}, Legend( 3 ) ); 
gb &amp;lt;&amp;lt; Remove Element( 1, 3 , 1 );  //remove bar chart&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 07 Nov 2023 21:41:35 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Graph-Builder-JSL-commands-on-Elements/m-p/695406#M88048</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2023-11-07T21:41:35Z</dc:date>
    </item>
  </channel>
</rss>

