<?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 Custom Annotation Based on Framebox content in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Custom-Annotation-Based-on-Framebox-content/m-p/520933#M74639</link>
    <description>&lt;P&gt;I would like to add an annotation to each individual frame of a graph builder report.&amp;nbsp; Here is a (trivial) example...&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" );
gb = Graph Builder( Variables( X( :height ), Y( :weight ), Group X( :sex ), Group Y( :age ) ) );
gb &amp;lt;&amp;lt; SendToReport( Dispatch( {}, "Graph Builder", FrameBox, Add Text Annotation( Text( "Female-12" ), Filled( 0 ) ) ) );&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&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-left" image-alt="2022-07-13_11-48-56.jpg" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/43930i3FC60F163EB7EC4A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="2022-07-13_11-48-56.jpg" alt="2022-07-13_11-48-56.jpg" /&gt;&lt;/span&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;P&gt;&amp;nbsp;&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;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In this example above, the top left Framebox has an annotation "Female-12" in it.&amp;nbsp; &amp;nbsp; This was done in a hard coded way.&amp;nbsp; I would like to add an annotation to each Frame based on the grouping of data in that frame.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ideally, I'd like to know what the X-group and Y-group is for each framebox and compose an annotation based on that and add it to each Framebox.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ideally, I'd like to also redo these annotations after a change has been made to the local data filter in case the assignment of Framebox # to grouping changes as someone clicks through the local data filter.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So - how do I figure out which data is in each framebox?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 09 Jun 2023 17:04:14 GMT</pubDate>
    <dc:creator>hhggzz</dc:creator>
    <dc:date>2023-06-09T17:04:14Z</dc:date>
    <item>
      <title>Custom Annotation Based on Framebox content</title>
      <link>https://community.jmp.com/t5/Discussions/Custom-Annotation-Based-on-Framebox-content/m-p/520933#M74639</link>
      <description>&lt;P&gt;I would like to add an annotation to each individual frame of a graph builder report.&amp;nbsp; Here is a (trivial) example...&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" );
gb = Graph Builder( Variables( X( :height ), Y( :weight ), Group X( :sex ), Group Y( :age ) ) );
gb &amp;lt;&amp;lt; SendToReport( Dispatch( {}, "Graph Builder", FrameBox, Add Text Annotation( Text( "Female-12" ), Filled( 0 ) ) ) );&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&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-left" image-alt="2022-07-13_11-48-56.jpg" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/43930i3FC60F163EB7EC4A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="2022-07-13_11-48-56.jpg" alt="2022-07-13_11-48-56.jpg" /&gt;&lt;/span&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;P&gt;&amp;nbsp;&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;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In this example above, the top left Framebox has an annotation "Female-12" in it.&amp;nbsp; &amp;nbsp; This was done in a hard coded way.&amp;nbsp; I would like to add an annotation to each Frame based on the grouping of data in that frame.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ideally, I'd like to know what the X-group and Y-group is for each framebox and compose an annotation based on that and add it to each Framebox.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ideally, I'd like to also redo these annotations after a change has been made to the local data filter in case the assignment of Framebox # to grouping changes as someone clicks through the local data filter.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So - how do I figure out which data is in each framebox?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 17:04:14 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Custom-Annotation-Based-on-Framebox-content/m-p/520933#M74639</guid>
      <dc:creator>hhggzz</dc:creator>
      <dc:date>2023-06-09T17:04:14Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Annotation Based on Framebox content</title>
      <link>https://community.jmp.com/t5/Discussions/Custom-Annotation-Based-on-Framebox-content/m-p/520982#M74643</link>
      <description>&lt;P&gt;Groupings in graph builder are a bit annoying to work with, but... you should know the order based on the datatable and you also know the grouping columns you have. With that information you might be able to create the annotations&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

dt = Open("$SAMPLE_DATA/Big Class.jmp");
gb = Graph Builder(Variables(X(:height), Y(:weight), Group X(:sex), Group Y(:age)));

Summarize(dt, uniq = By(:sex, :age));
For Each({{a, b}, idx}, Across(uniq[1], uniq[2]),
	frame = (gb &amp;lt;&amp;lt; report)[FrameBox(idx)];
	frame &amp;lt;&amp;lt; Add Text Annotation(Text(Eval Insert("^a^ - ^b^")));
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_0-1657739938628.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/43932iE062D9808795F87D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_0-1657739938628.png" alt="jthi_0-1657739938628.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;With Local Data Filter you might have to parse the Where statement and use that information to get correct groups.&lt;/P&gt;
&lt;P&gt;This topic might have some additional ideas &lt;LI-MESSAGE title="Identifying Titles of Graph Builder Page Titles" uid="426334" url="https://community.jmp.com/t5/Discussions/Identifying-Titles-of-Graph-Builder-Page-Titles/m-p/426334#U426334" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-forum-thread lia-fa-icon lia-fa-forum lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jul 2022 19:34:55 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Custom-Annotation-Based-on-Framebox-content/m-p/520982#M74643</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2022-07-13T19:34:55Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Annotation Based on Framebox content</title>
      <link>https://community.jmp.com/t5/Discussions/Custom-Annotation-Based-on-Framebox-content/m-p/520991#M74645</link>
      <description>&lt;P&gt;Here is how I would handle it&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
//This message applies to all display box objects
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );

gb = Graph Builder(
	Size( 567, 496 ),
	Show Control Panel( 0 ),
	Variables( X( :weight ), Y( :height ), Group X( :sex ), Group Y( :age ) ),
	Elements( Points( X, Y, Legend( 11 ) ), Smoother( X, Y, Legend( 12 ) ) )
);
rgb = Report( gb );

rgb[FrameBox( 1 )] &amp;lt;&amp;lt; Add Text Annotation(
	Text( "Text for FrameBox(1)" ),
	Fixed Size( 0 ),
	Text Box( {-1, 5, 138, 32} ),
	Filled( 0 )
);
rgb[FrameBox( 7 )] &amp;lt;&amp;lt; Add Text Annotation(
	Text( "Text for FrameBox(7)" ),
	Fixed Size( 0 ),
	Text Box( {-1, 0, 138, 27} ),
	Filled( 0 )
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="txnelson_0-1657741352017.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/43933iB229E3DD6B8426E5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="txnelson_0-1657741352017.png" alt="txnelson_0-1657741352017.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jul 2022 19:42:47 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Custom-Annotation-Based-on-Framebox-content/m-p/520991#M74645</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2022-07-13T19:42:47Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Annotation Based on Framebox content</title>
      <link>https://community.jmp.com/t5/Discussions/Custom-Annotation-Based-on-Framebox-content/m-p/521001#M74646</link>
      <description>&lt;P&gt;While your example shows how to add an annotation to each framebox,&amp;nbsp; the question I am asking is how to find out Y-grouping and X-grouping is in that framebox.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jul 2022 20:01:27 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Custom-Annotation-Based-on-Framebox-content/m-p/521001#M74646</guid>
      <dc:creator>hhggzz</dc:creator>
      <dc:date>2022-07-13T20:01:27Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Annotation Based on Framebox content</title>
      <link>https://community.jmp.com/t5/Discussions/Custom-Annotation-Based-on-Framebox-content/m-p/521036#M74648</link>
      <description>&lt;P&gt;I do not know the answer to that.&amp;nbsp; I always have worked it by knowing what the X and Y groupings are and then going from there.&amp;nbsp; I suspect you could retrieve the script from the object, and then strip out the Group X and Group Y columns, and go from there.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jul 2022 20:26:39 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Custom-Annotation-Based-on-Framebox-content/m-p/521036#M74648</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2022-07-13T20:26:39Z</dc:date>
    </item>
  </channel>
</rss>

