<?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: Proc Gchart and annotate dataset in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Proc-Gchart-and-annotate-dataset/m-p/53513#M1841</link>
    <description>When you're annotating on a gchart vbar, you need variables called 'midpoint' and 'y', rather than 'x' and 'y', I believe.&lt;BR /&gt;
&lt;BR /&gt;
Here's a simple example that annotates a line on a bar chart, that might help:&lt;BR /&gt;
&lt;BR /&gt;
&lt;A href="http://robslink.com/SAS/democd31/shoebar.htm" target="_blank"&gt;http://robslink.com/SAS/democd31/shoebar.htm&lt;/A&gt;&lt;BR /&gt;
&lt;A href="http://robslink.com/SAS/democd31/shoebar_info.htm" target="_blank"&gt;http://robslink.com/SAS/democd31/shoebar_info.htm&lt;/A&gt;</description>
    <pubDate>Wed, 21 Jul 2010 12:24:37 GMT</pubDate>
    <dc:creator>GraphGuy</dc:creator>
    <dc:date>2010-07-21T12:24:37Z</dc:date>
    <item>
      <title>Proc Gchart and annotate dataset</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Proc-Gchart-and-annotate-dataset/m-p/53512#M1840</link>
      <description>Hello SAS-users.&lt;BR /&gt;
&lt;BR /&gt;
I have no experience with annotate datasets. I'm trying to use annotate at first time.&lt;BR /&gt;
I build a graph using Gchart procedure. See part 1 of the code below.&lt;BR /&gt;
Now I need to add two lines at the same graph. I have tried to draw these lines by using annotate dataset.&lt;BR /&gt;
See part 2 of the code below.&lt;BR /&gt;
There are no errors in the Log. But the lines are not visualising in the output window.&lt;BR /&gt;
&lt;BR /&gt;
What am I doing wrong?&lt;BR /&gt;
Please help.&lt;BR /&gt;
&lt;BR /&gt;
Oleg.&lt;BR /&gt;
&lt;BR /&gt;
[pre]&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
 /* Code part 1 */&lt;BR /&gt;
 /* input dataset for proc gchart */&lt;BR /&gt;
&lt;BR /&gt;
data inp;&lt;BR /&gt;
infile cards dlm=',';&lt;BR /&gt;
informat date date9. cbmb11 $2. pct percent8.;&lt;BR /&gt;
format date mmddyy10. pct percentn8.2;&lt;BR /&gt;
input date  cbmb11  pct ;&lt;BR /&gt;
cards;&lt;BR /&gt;
31DEC2009,CB,  0.00%&lt;BR /&gt;
31DEC2009,MB,  0.00%&lt;BR /&gt;
31JAN2010,CB,  1.87%&lt;BR /&gt;
31JAN2010,MB,  3.31%&lt;BR /&gt;
28FEB2010,CB,  2.09%&lt;BR /&gt;
28FEB2010,MB,  0.05%&lt;BR /&gt;
31MAR2010,CB,  2.01%&lt;BR /&gt;
31MAR2010,MB,  0.81%&lt;BR /&gt;
;&lt;BR /&gt;
&lt;BR /&gt;
goptions reset=all;&lt;BR /&gt;
title1 "Dynamic (%)" ;&lt;BR /&gt;
axis1 color=black width=3  label=(color=black height=0.75 "%") minor=(number=1) value=(height=0.75) order=(0 to 0.07 by 0.01);&lt;BR /&gt;
axis2 color=black width=3  label=(color=black height=0.75 "Date")       value=(height=0.75);&lt;BR /&gt;
goptions device=win  cback=white ftext="Arial" htitle=1;&lt;BR /&gt;
pattern1 color=blue value=r3 r=1;&lt;BR /&gt;
pattern2 color=green value=l1 r=1;&lt;BR /&gt;
&lt;BR /&gt;
 /* Gchart proc. without annotate */&lt;BR /&gt;
&lt;BR /&gt;
proc gchart data=inp ;&lt;BR /&gt;
vbar cbmb11 / sumvar=pct  width=8 group=date discrete  gaxis=axis2 axis=axis1 frame sum patternid=midpoint space=0 ;&lt;BR /&gt;
run;&lt;BR /&gt;
quit;&lt;BR /&gt;
&lt;BR /&gt;
/* Code part 2 */&lt;BR /&gt;
/* Annotate dataset */&lt;BR /&gt;
&lt;BR /&gt;
data an;&lt;BR /&gt;
infile cards dlm=',';&lt;BR /&gt;
informat xsys $1.  ysys $1.  hsys $1. function $8.  color $8.  group date9.  x date9.  y percent8. line 8.  size 8.;&lt;BR /&gt;
format group x mmddyy10. y percentn8.2;&lt;BR /&gt;
input xsys ysys hsys function color group x y line size;&lt;BR /&gt;
cards;&lt;BR /&gt;
2,2,1 ,move    ,        ,31DEC2009,31DEC2009,  0.00% ,       .,       .&lt;BR /&gt;
2,2,1 ,draw    ,blue    ,31JAN2010,31JAN2010,  1.87% ,       2,      20&lt;BR /&gt;
2,2,1 ,move    ,        ,31JAN2010,31JAN2010,  1.87% ,       .,       .&lt;BR /&gt;
2,2,1 ,draw    ,blue    ,28FEB2010,28FEB2010,  4.00% ,       2,      20&lt;BR /&gt;
2,2,1 ,move    ,        ,28FEB2010,28FEB2010,  4.00% ,       .,       .&lt;BR /&gt;
2,2,1 ,draw    ,blue    ,31MAR2010,31MAR2010,  6.09% ,       2,      20&lt;BR /&gt;
2,2,1 ,move    ,        ,31MAR2010,31MAR2010,  6.09% ,       .,       .&lt;BR /&gt;
2,2,1 ,draw    ,blue    ,31MAR2010,31MAR2010,  6.09% ,       2,      20&lt;BR /&gt;
2,2,1 ,move    ,        ,31DEC2009,31DEC2009,  0.00% ,       .,       .&lt;BR /&gt;
2,2,1 ,draw    ,green   ,31JAN2010,31JAN2010,  3.31% ,       1,       5&lt;BR /&gt;
2,2,1 ,move    ,        ,31JAN2010,31JAN2010,  3.31% ,       .,       .&lt;BR /&gt;
2,2,1 ,draw    ,green   ,28FEB2010,28FEB2010,  3.37% ,       1,       5&lt;BR /&gt;
2,2,1 ,move    ,        ,28FEB2010,28FEB2010,  3.37% ,       .,       .&lt;BR /&gt;
2,2,1 ,draw    ,green   ,31MAR2010,31MAR2010,  4.20% ,       1,       5&lt;BR /&gt;
2,2,1 ,move    ,        ,31MAR2010,31MAR2010,  4.20% ,       .,       .&lt;BR /&gt;
2,2,1 ,draw    ,green   ,31MAR2010,31MAR2010,  4.20% ,       1,       5&lt;BR /&gt;
;&lt;BR /&gt;
&lt;BR /&gt;
 /* Gchart proc. with annotate */&lt;BR /&gt;
&lt;BR /&gt;
proc gchart data=inp ;&lt;BR /&gt;
vbar cbmb11 / sumvar=pct  width=8 group=date discrete  gaxis=axis2 axis=axis1&lt;BR /&gt;
              frame sum patternid=midpoint space=0 annotate=an ;&lt;BR /&gt;
run;&lt;BR /&gt;
quit;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
[/pre]</description>
      <pubDate>Wed, 21 Jul 2010 10:46:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Proc-Gchart-and-annotate-dataset/m-p/53512#M1840</guid>
      <dc:creator>Oleg_L</dc:creator>
      <dc:date>2010-07-21T10:46:58Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Gchart and annotate dataset</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Proc-Gchart-and-annotate-dataset/m-p/53513#M1841</link>
      <description>When you're annotating on a gchart vbar, you need variables called 'midpoint' and 'y', rather than 'x' and 'y', I believe.&lt;BR /&gt;
&lt;BR /&gt;
Here's a simple example that annotates a line on a bar chart, that might help:&lt;BR /&gt;
&lt;BR /&gt;
&lt;A href="http://robslink.com/SAS/democd31/shoebar.htm" target="_blank"&gt;http://robslink.com/SAS/democd31/shoebar.htm&lt;/A&gt;&lt;BR /&gt;
&lt;A href="http://robslink.com/SAS/democd31/shoebar_info.htm" target="_blank"&gt;http://robslink.com/SAS/democd31/shoebar_info.htm&lt;/A&gt;</description>
      <pubDate>Wed, 21 Jul 2010 12:24:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Proc-Gchart-and-annotate-dataset/m-p/53513#M1841</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2010-07-21T12:24:37Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Gchart and annotate dataset</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Proc-Gchart-and-annotate-dataset/m-p/53514#M1842</link>
      <description>Thank you very much for your help.&lt;BR /&gt;
&lt;BR /&gt;
You pushed me in a right direction. I've achieved some progress. Lines are appeared. I will work on other details.&lt;BR /&gt;
&lt;BR /&gt;
Regards,&lt;BR /&gt;
Oleg.</description>
      <pubDate>Wed, 21 Jul 2010 14:06:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Proc-Gchart-and-annotate-dataset/m-p/53514#M1842</guid>
      <dc:creator>Oleg_L</dc:creator>
      <dc:date>2010-07-21T14:06:17Z</dc:date>
    </item>
  </channel>
</rss>

