<?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: Is there is a way to display the values of variable in the stacked bar graphs in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Is-there-is-a-way-to-display-the-values-of-variable-in-the/m-p/296961#M10511</link>
    <description>&lt;P&gt;Thank you very much&lt;/P&gt;</description>
    <pubDate>Wed, 07 Sep 2016 13:39:51 GMT</pubDate>
    <dc:creator>sanjay1</dc:creator>
    <dc:date>2016-09-07T13:39:51Z</dc:date>
    <item>
      <title>Is there is a way to display the values of variable in the stacked bar graphs</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Is-there-is-a-way-to-display-the-values-of-variable-in-the/m-p/296913#M10507</link>
      <description>&lt;P&gt;Hi SAS Experts,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Am trying to displey the values of variable which have numbers in the stacked bar graph. is there is anyway to do this.&lt;/P&gt;&lt;P&gt;Below is my &amp;nbsp;data and code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data test1;&lt;BR /&gt;input name$ cnt year;&lt;BR /&gt;datalines;&lt;BR /&gt;abc 21 2012&lt;BR /&gt;def 20 2012&lt;BR /&gt;ghi 490 2012&lt;BR /&gt;gha 5 2012&lt;BR /&gt;jkl 5 2012&lt;BR /&gt;mno 46 2012&lt;BR /&gt;pqr 120 2012&lt;BR /&gt;abc 15 2013&lt;BR /&gt;def 26 2013&lt;BR /&gt;ghi 600 2013&lt;BR /&gt;gha 155 2013&lt;BR /&gt;jkl 50 2013&lt;BR /&gt;mno 146 2013&lt;BR /&gt;pqr 124 2013&lt;BR /&gt;abc 201 2014&lt;BR /&gt;def 120 2014&lt;BR /&gt;ghi 49 2014&lt;BR /&gt;gha 50 2014&lt;BR /&gt;jkl 155 2014&lt;BR /&gt;mno 406 2014&lt;BR /&gt;pqr 128 2014&lt;BR /&gt;abc 121 2015&lt;BR /&gt;def 220 2015&lt;BR /&gt;ghi 190 2015&lt;BR /&gt;gha 85 2015&lt;BR /&gt;jkl 506 2015&lt;BR /&gt;mno 146 2015&lt;BR /&gt;pqr 128 2015&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;data barlabel1;&lt;BR /&gt;length color $ 8;&lt;BR /&gt;retain color 'black' when 'a'&lt;BR /&gt;xsys ysys '2' position 'E';&lt;BR /&gt;set test1;&lt;BR /&gt;midpoint=year;&lt;BR /&gt;/* subgroup=staffing_type;*/&lt;BR /&gt;/* text=put(cnt,5.);*/&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;axis1 label=none major=none minor=none style=0&lt;BR /&gt;value=none;&lt;BR /&gt;axis2 label=none;&lt;BR /&gt;legend1 label=(position=top) position=(right middle)&lt;BR /&gt;across=1 shape=bar(.11in,.11in);&lt;/P&gt;&lt;P&gt;ods pdf file="path.pdf";&lt;/P&gt;&lt;P&gt;ods graphics / reset width=600px height=500px imagefmt=png imagename='BarChart';&lt;BR /&gt;proc sgplot data=test1 sganno=barlabel1;&lt;BR /&gt;vbar year/response=cnt group=name groupdisplay=stack;&lt;BR /&gt;yaxis label="year cnt";&lt;BR /&gt;title h=2 "new";&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1.Test-add_values is my output&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. I want the output like the below image&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG src="http://blogs.sas.com/content/graphicallyspeaking/files/2013/09/StackedBarAllLabel.png" border="0" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Sep 2016 08:33:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Is-there-is-a-way-to-display-the-values-of-variable-in-the/m-p/296913#M10507</guid>
      <dc:creator>sanjay1</dc:creator>
      <dc:date>2016-09-07T08:33:52Z</dc:date>
    </item>
    <item>
      <title>Re: Is there is a way to display the values of variable in the stacked bar graphs</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Is-there-is-a-way-to-display-the-values-of-variable-in-the/m-p/296940#M10508</link>
      <description>&lt;P&gt;Here's one way to do it with Proc Gchart and annotate ...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data test1;&lt;BR /&gt;input name$ cnt year;&lt;BR /&gt;datalines;&lt;BR /&gt;abc 21 2012&lt;BR /&gt;def 20 2012&lt;BR /&gt;ghi 490 2012&lt;BR /&gt;gha 5 2012&lt;BR /&gt;jkl 5 2012&lt;BR /&gt;mno 46 2012&lt;BR /&gt;pqr 120 2012&lt;BR /&gt;abc 15 2013&lt;BR /&gt;def 26 2013&lt;BR /&gt;ghi 600 2013&lt;BR /&gt;gha 155 2013&lt;BR /&gt;jkl 50 2013&lt;BR /&gt;mno 146 2013&lt;BR /&gt;pqr 124 2013&lt;BR /&gt;abc 201 2014&lt;BR /&gt;def 120 2014&lt;BR /&gt;ghi 49 2014&lt;BR /&gt;gha 50 2014&lt;BR /&gt;jkl 155 2014&lt;BR /&gt;mno 406 2014&lt;BR /&gt;pqr 128 2014&lt;BR /&gt;abc 121 2015&lt;BR /&gt;def 220 2015&lt;BR /&gt;ghi 190 2015&lt;BR /&gt;gha 85 2015&lt;BR /&gt;jkl 506 2015&lt;BR /&gt;mno 146 2015&lt;BR /&gt;pqr 128 2015&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data barlabel1; set test1;&lt;BR /&gt;color='black'; when='a'; xsys='2'; ysys='2'; when='a'; hsys='3';&lt;BR /&gt;function='label'; position='e'; size=2.0;&lt;BR /&gt;midpoint=name; subgroup=year; &lt;BR /&gt;text=trim(left(cnt));&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;axis1 label=(angle=90 'Count') order=(0 to 1500 by 300) offset=(0,0) minor=none;&lt;BR /&gt;axis2 label=none;&lt;BR /&gt;legend1 cborder=gray55 shape=bar(.15in,.15in);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;goptions xpixels=600 ypixels=500;&lt;BR /&gt;goptions ftitle='albany amt/bold' ftext='albany amt' gunit=pct htitle=3.5 htext=2.5;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;title1 ls=1.5 "Sales Count by Product and Year";&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;proc gchart data=test1 anno=barlabel1;&lt;BR /&gt;vbar name / discrete type=sum sumvar=cnt&lt;BR /&gt; subgroup=year raxis=axis1 maxis=axis2 legend=legend1 &lt;BR /&gt; coutline=gray55 width=9 outside=sum&lt;BR /&gt; autoref clipref cref=graydd;&lt;BR /&gt; run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/4852i03014CC7A1F37303/image-size/original?v=v2&amp;amp;px=-1" border="0" alt="bar.png" title="bar.png" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Sep 2016 11:56:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Is-there-is-a-way-to-display-the-values-of-variable-in-the/m-p/296940#M10508</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2016-09-07T11:56:22Z</dc:date>
    </item>
    <item>
      <title>Re: Is there is a way to display the values of variable in the stacked bar graphs</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Is-there-is-a-way-to-display-the-values-of-variable-in-the/m-p/296952#M10509</link>
      <description>&lt;P&gt;Another possibility is to specify INSIDE=SUM along with your OUTSIDE=SUM. This will put the bar totals at the top and segment totals on the inside.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Sep 2016 13:07:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Is-there-is-a-way-to-display-the-values-of-variable-in-the/m-p/296952#M10509</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2016-09-07T13:07:32Z</dc:date>
    </item>
    <item>
      <title>Re: Is there is a way to display the values of variable in the stacked bar graphs</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Is-there-is-a-way-to-display-the-values-of-variable-in-the/m-p/296954#M10510</link>
      <description>&lt;P&gt;For SGPLOT, just add the DATALABEL and SEGLABEL options (no annotation required):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgplot data=test1 sganno=barlabel1;
vbar year / response=cnt group=name groupdisplay=stack
            datalabel seglabel;
yaxis label="year cnt";
title h=2 "new";
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 07 Sep 2016 13:13:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Is-there-is-a-way-to-display-the-values-of-variable-in-the/m-p/296954#M10510</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2016-09-07T13:13:31Z</dc:date>
    </item>
    <item>
      <title>Re: Is there is a way to display the values of variable in the stacked bar graphs</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Is-there-is-a-way-to-display-the-values-of-variable-in-the/m-p/296961#M10511</link>
      <description>&lt;P&gt;Thank you very much&lt;/P&gt;</description>
      <pubDate>Wed, 07 Sep 2016 13:39:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Is-there-is-a-way-to-display-the-values-of-variable-in-the/m-p/296961#M10511</guid>
      <dc:creator>sanjay1</dc:creator>
      <dc:date>2016-09-07T13:39:51Z</dc:date>
    </item>
  </channel>
</rss>

