<?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: Bart chart -Add label of pct information in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Bart-chart-Add-label-of-pct-information/m-p/623391#M183526</link>
    <description>&lt;P&gt;I want to show labels of PCT&lt;/P&gt;
&lt;P&gt;12% &lt;BR /&gt;48% &lt;BR /&gt;20% &lt;BR /&gt;12% &lt;BR /&gt;6.0% &lt;BR /&gt;2.0%&lt;/P&gt;
&lt;P&gt;and the bar height will be relatd to values:&lt;/P&gt;
&lt;P&gt;30&lt;BR /&gt;120&lt;BR /&gt;50&lt;BR /&gt;30&lt;BR /&gt;15&lt;BR /&gt;5&lt;/P&gt;</description>
    <pubDate>Sun, 09 Feb 2020 09:06:41 GMT</pubDate>
    <dc:creator>Ronein</dc:creator>
    <dc:date>2020-02-09T09:06:41Z</dc:date>
    <item>
      <title>Bart chart -Add label of pct information</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Bart-chart-Add-label-of-pct-information/m-p/623383#M183521</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;
&lt;P&gt;I want to create a simple bar chart that show for each score ,sum of loans.&lt;/P&gt;
&lt;P&gt;I want that in the top of each bar there will be a label with&amp;nbsp;&lt;CODE class=" language-sas"&gt;PCT_SUM_LOAN information.&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE class=" language-sas"&gt;What is the way to it please?&lt;/CODE&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
Data summaryinfo;
input Score $ sum_loans;
cards;
0 30 
2-4 120
5-6 50 
7-8 30 
9-12 15 
13 5 
;
run;
Proc SQL;                                                       
  Create Table summaryinfo2 AS                                     
    Select *,(sum_loans/SUM(sum_loans)) AS PCT_SUM_LOAN format=percent6.2      
  	From summaryinfo                                             
;
Quit;

title;
proc sgplot data=summaryinfo2 noborder;
vbarparm category=Score response=sum_loans/group=Score groupdisplay=cluster 
datalabel dataskin=pressed;
xaxis display=(noticks noline nolabel);
yaxis display=(noticks nolabel noline) grid;
run;

&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 09 Feb 2020 08:14:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Bart-chart-Add-label-of-pct-information/m-p/623383#M183521</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2020-02-09T08:14:44Z</dc:date>
    </item>
    <item>
      <title>Re: Bart chart -Add label of pct information</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Bart-chart-Add-label-of-pct-information/m-p/623387#M183524</link>
      <description>&lt;P&gt;Using your code, I see the following. Isn't that what you want?&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-inline" image-alt="Annotation 2020-02-09 082756.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/35950i9BF3F50E488E51EC/image-size/large?v=v2&amp;amp;px=999" role="button" title="Annotation 2020-02-09 082756.png" alt="Annotation 2020-02-09 082756.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 09 Feb 2020 08:29:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Bart-chart-Add-label-of-pct-information/m-p/623387#M183524</guid>
      <dc:creator>Norman21</dc:creator>
      <dc:date>2020-02-09T08:29:52Z</dc:date>
    </item>
    <item>
      <title>Re: Bart chart -Add label of pct information</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Bart-chart-Add-label-of-pct-information/m-p/623391#M183526</link>
      <description>&lt;P&gt;I want to show labels of PCT&lt;/P&gt;
&lt;P&gt;12% &lt;BR /&gt;48% &lt;BR /&gt;20% &lt;BR /&gt;12% &lt;BR /&gt;6.0% &lt;BR /&gt;2.0%&lt;/P&gt;
&lt;P&gt;and the bar height will be relatd to values:&lt;/P&gt;
&lt;P&gt;30&lt;BR /&gt;120&lt;BR /&gt;50&lt;BR /&gt;30&lt;BR /&gt;15&lt;BR /&gt;5&lt;/P&gt;</description>
      <pubDate>Sun, 09 Feb 2020 09:06:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Bart-chart-Add-label-of-pct-information/m-p/623391#M183526</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2020-02-09T09:06:41Z</dc:date>
    </item>
    <item>
      <title>Re: Bart chart -Add label of pct information</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Bart-chart-Add-label-of-pct-information/m-p/623394#M183528</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159549"&gt;@Ronein&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Maybe more basic in terms of appearance, but with the display of percentages:&lt;/P&gt;
&lt;P&gt;NB: I encourage you to use a format for categories.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Data summaryinfo;
	input Score sum_loans;
	format Score score.;
	cards;
0 30 
1 120
2 50 
3 30 
4 15 
5 5 
;
run;

proc format;
	value score
		0 = "0"
		1 = "2-4"
		2 = "5-6"
		3 = "7-8"
		4 = "9-12"
		5 = "13";
run;

title;
axis1 label=none;
proc gchart data=summaryinfo;
	vbar score / freq=sum_loans percent type=freq discrete raxis=axis1;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture d’écran 2020-02-09 à 10.16.54.png" style="width: 225px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/35951iD3E9D3D427C4A146/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Capture d’écran 2020-02-09 à 10.16.54.png" alt="Capture d’écran 2020-02-09 à 10.16.54.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 09 Feb 2020 09:17:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Bart-chart-Add-label-of-pct-information/m-p/623394#M183528</guid>
      <dc:creator>ed_sas_member</dc:creator>
      <dc:date>2020-02-09T09:17:52Z</dc:date>
    </item>
    <item>
      <title>Re: Bart chart -Add label of pct information</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Bart-chart-Add-label-of-pct-information/m-p/623400#M183532</link>
      <description>&lt;P&gt;Thank you.&lt;/P&gt;
&lt;P&gt;What will be the way to create labels above each bar with&amp;nbsp;sum_loans information?&lt;/P&gt;
&lt;P&gt;(So we will see the numbers&amp;nbsp;30,120,50,30,15,5) above the bars&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 09 Feb 2020 10:23:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Bart-chart-Add-label-of-pct-information/m-p/623400#M183532</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2020-02-09T10:23:03Z</dc:date>
    </item>
    <item>
      <title>Re: Bart chart -Add label of pct information</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Bart-chart-Add-label-of-pct-information/m-p/623401#M183533</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159549"&gt;@Ronein&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To put sum_loans values instead of percent above the bars, you can simply replace 'percent' by 'freq' in the below code:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;title;
axis1 label=none;
proc gchart data=summaryinfo;
	vbar score / freq=sum_loans freq type=freq discrete raxis=axis1;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 09 Feb 2020 10:43:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Bart-chart-Add-label-of-pct-information/m-p/623401#M183533</guid>
      <dc:creator>ed_sas_member</dc:creator>
      <dc:date>2020-02-09T10:43:04Z</dc:date>
    </item>
  </channel>
</rss>

