<?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 Annotate with a By statement in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Annotate-with-a-By-statement/m-p/13647#M269</link>
    <description>I'm trying to use an annotate dataset with a BY statement in gchart.  The procedure plots the charts correctly but only reads the first level of by variables in the annotate dataset.  &lt;BR /&gt;
ERROR: The by-variable drc from WORK.TOP10ALLBARS has the value T04, but in WORK.ANNO it has the value N01. This is not permissible with the NOTSORTED option, in which all by-groups must match exactly.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Is there a way to use annotate in a BY situation?  &lt;BR /&gt;
Code that I'm using just below.&lt;BR /&gt;
Any help would be appreciated.!&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
proc sort data=Top10AllBars;&lt;BR /&gt;
  by Order Period DRC; /*DRC values are alike within an Order level*/&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
data anno;                                                                                                                              &lt;BR /&gt;
  set Top10AllBars (keep=Period Pct DRC);  &lt;BR /&gt;
	by DRC notsorted;&lt;BR /&gt;
  function='label'; &lt;BR /&gt;
  xsys='2'; &lt;BR /&gt;
  ysys='2';                                                                                                   &lt;BR /&gt;
  midpoint=period;&lt;BR /&gt;
  y=Pct;                                                                                               &lt;BR /&gt;
  text=trim(left(put(Pct,4.2))); &lt;BR /&gt;
  size=1.5; &lt;BR /&gt;
  position='2'; &lt;BR /&gt;
  color='black'; &lt;BR /&gt;
  when='a';                                                                                &lt;BR /&gt;
  output;                                                                                                               &lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
proc gchart data=Top10AllBars;&lt;BR /&gt;
	by DRC notsorted;&lt;BR /&gt;
  vbar period/sumvar=pct&lt;BR /&gt;
                annotate=anno&lt;BR /&gt;
;&lt;BR /&gt;
run;</description>
    <pubDate>Fri, 30 Apr 2010 18:18:59 GMT</pubDate>
    <dc:creator>Bill</dc:creator>
    <dc:date>2010-04-30T18:18:59Z</dc:date>
    <item>
      <title>Annotate with a By statement</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Annotate-with-a-By-statement/m-p/13647#M269</link>
      <description>I'm trying to use an annotate dataset with a BY statement in gchart.  The procedure plots the charts correctly but only reads the first level of by variables in the annotate dataset.  &lt;BR /&gt;
ERROR: The by-variable drc from WORK.TOP10ALLBARS has the value T04, but in WORK.ANNO it has the value N01. This is not permissible with the NOTSORTED option, in which all by-groups must match exactly.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Is there a way to use annotate in a BY situation?  &lt;BR /&gt;
Code that I'm using just below.&lt;BR /&gt;
Any help would be appreciated.!&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
proc sort data=Top10AllBars;&lt;BR /&gt;
  by Order Period DRC; /*DRC values are alike within an Order level*/&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
data anno;                                                                                                                              &lt;BR /&gt;
  set Top10AllBars (keep=Period Pct DRC);  &lt;BR /&gt;
	by DRC notsorted;&lt;BR /&gt;
  function='label'; &lt;BR /&gt;
  xsys='2'; &lt;BR /&gt;
  ysys='2';                                                                                                   &lt;BR /&gt;
  midpoint=period;&lt;BR /&gt;
  y=Pct;                                                                                               &lt;BR /&gt;
  text=trim(left(put(Pct,4.2))); &lt;BR /&gt;
  size=1.5; &lt;BR /&gt;
  position='2'; &lt;BR /&gt;
  color='black'; &lt;BR /&gt;
  when='a';                                                                                &lt;BR /&gt;
  output;                                                                                                               &lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
proc gchart data=Top10AllBars;&lt;BR /&gt;
	by DRC notsorted;&lt;BR /&gt;
  vbar period/sumvar=pct&lt;BR /&gt;
                annotate=anno&lt;BR /&gt;
;&lt;BR /&gt;
run;</description>
      <pubDate>Fri, 30 Apr 2010 18:18:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Annotate-with-a-By-statement/m-p/13647#M269</guid>
      <dc:creator>Bill</dc:creator>
      <dc:date>2010-04-30T18:18:59Z</dc:date>
    </item>
    <item>
      <title>Re: Annotate with a By statement</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Annotate-with-a-By-statement/m-p/13648#M270</link>
      <description>I've found an answer at &lt;A href="http://support.sas.com/kb/16/615.html" target="_blank"&gt;http://support.sas.com/kb/16/615.html&lt;/A&gt;. Given that I'm using 9.1.3, I'll need to use some macro programming.</description>
      <pubDate>Fri, 30 Apr 2010 18:42:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Annotate-with-a-By-statement/m-p/13648#M270</guid>
      <dc:creator>Bill</dc:creator>
      <dc:date>2010-04-30T18:42:21Z</dc:date>
    </item>
  </channel>
</rss>

