<?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: Creating Data Labels on Bar Chart in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Creating-Data-Labels-on-Bar-Chart/m-p/350986#M12196</link>
    <description>&lt;P&gt;Thank you! I had tried that previously but it wasn't working.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I appreciate your help!&lt;/P&gt;</description>
    <pubDate>Tue, 18 Apr 2017 19:05:20 GMT</pubDate>
    <dc:creator>bldudley</dc:creator>
    <dc:date>2017-04-18T19:05:20Z</dc:date>
    <item>
      <title>Creating Data Labels on Bar Chart</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Creating-Data-Labels-on-Bar-Chart/m-p/350970#M12194</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to add data labels to my bar chart. Currently I am getting the variable instead of an actual value in percent.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you help?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;title 'Game Attendance Percentages';
proc sgplot data=profoot.pro_football_segments;
	hbar game_attendance /datalabel=game_attendance stat=percent  fillattrs=(color=grey);
	xaxis label='Percentage of Game Attendance' labelattrs=(size=12);
	yaxis label='Game Attendance' labelattrs=(size=12);
run; &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Log:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt; 1          OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 61         
 62         title 'Game Attendance Percentages';
 63         proc sgplot data=profoot.pro_football_segments;
 64         hbar game_attendance /datalabel=game_attendance stat=percent  fillattrs=(color=grey);
 65         xaxis label='Percentage of Game Attendance' labelattrs=(size=12);
 66         yaxis label='Game Attendance' labelattrs=(size=12);
 67         run;
 
 NOTE: PROCEDURE SGPLOT used (Total process time):
       real time           0.79 seconds
       cpu time            0.29 seconds
       
 NOTE: There were 473 observations read from the data set PROFOOT.PRO_FOOTBALL_SEGMENTS.
 
 68         
 69         OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 82         &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Results:&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/8371iE50CD3EF7E99369C/image-size/original?v=1.0&amp;amp;px=-1" alt="Capture.JPG" title="Capture.JPG" border="0" /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Apr 2017 18:41:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Creating-Data-Labels-on-Bar-Chart/m-p/350970#M12194</guid>
      <dc:creator>bldudley</dc:creator>
      <dc:date>2017-04-18T18:41:53Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Data Labels on Bar Chart</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Creating-Data-Labels-on-Bar-Chart/m-p/350983#M12195</link>
      <description>&lt;P&gt;Simply erase the&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;game_attendance&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;from your hbar options so that the&amp;nbsp;code is&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;title 'Game Attendance Percentages';
proc sgplot data=profoot.pro_football_segments;
	hbar game_attendance / datalabel stat=percent  fillattrs=(color=grey);
	xaxis label='Percentage of Game Attendance' labelattrs=(size=12);
	yaxis label='Game Attendance' labelattrs=(size=12);
run; &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;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Apr 2017 19:00:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Creating-Data-Labels-on-Bar-Chart/m-p/350983#M12195</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2017-04-18T19:00:30Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Data Labels on Bar Chart</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Creating-Data-Labels-on-Bar-Chart/m-p/350986#M12196</link>
      <description>&lt;P&gt;Thank you! I had tried that previously but it wasn't working.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I appreciate your help!&lt;/P&gt;</description>
      <pubDate>Tue, 18 Apr 2017 19:05:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Creating-Data-Labels-on-Bar-Chart/m-p/350986#M12196</guid>
      <dc:creator>bldudley</dc:creator>
      <dc:date>2017-04-18T19:05:20Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Data Labels on Bar Chart</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Creating-Data-Labels-on-Bar-Chart/m-p/350988#M12197</link>
      <description>&lt;P&gt;Anytime &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Apr 2017 19:08:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Creating-Data-Labels-on-Bar-Chart/m-p/350988#M12197</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2017-04-18T19:08:32Z</dc:date>
    </item>
  </channel>
</rss>

