<?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: re: donut chart in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/re-donut-chart/m-p/561743#M18203</link>
    <description>&lt;P&gt;Hi FreelanceReinhard….thank you for taking the time to responding to my problem. It worked....I never thought about entering blanks but was trying different things and even renaming the entries in Div so they appear in ascending order....Thanks once again...greatly appreciated&lt;/P&gt;</description>
    <pubDate>Mon, 27 May 2019 13:04:22 GMT</pubDate>
    <dc:creator>twildone</dc:creator>
    <dc:date>2019-05-27T13:04:22Z</dc:date>
    <item>
      <title>re: donut chart</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/re-donut-chart/m-p/561416#M18195</link>
      <description>&lt;P&gt;Hi....I am trying to create a donut graph and wondering if it is possible to order the subgroup as I believe the default is ascending and would like to change that. Thanks.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;data Have;
    length Div $ 22 Reg $ 35 Dep $ 14 '2017-18'n 8 '2016-17'n 8;
    format Div $char22. Reg $char35. Dep $char14. '2017-18'n comma12. '2016-17'n comma12.;
    informat Div $char22. Reg $char35. Dep $char14. '2017-18'n comma12. '2016-17'n comma12.;
    infile datalines4 dlm='7F'x missover dsd;
    input Div : $char22. Reg : $char35. Dep : $char14. '2017-18'n : best32. '2016-17'n : best32.;
datalines4;
Sec&amp;#127;MHS&amp;#127; &amp;#127;22&amp;#127;26
Sec&amp;#127;Se&amp;#127; &amp;#127;200&amp;#127;170
Pos&amp;#127;ELT&amp;#127;ESL&amp;#127;403&amp;#127;537
Pos&amp;#127;ELT&amp;#127;ELI&amp;#127;250&amp;#127;126
Pos&amp;#127;YB&amp;#127;YouthBuild&amp;#127;32&amp;#127;33
Pos&amp;#127;LLI&amp;#127;Aprrenticeship&amp;#127;42&amp;#127;49
Pos&amp;#127;LLI&amp;#127;OLLI&amp;#127;152&amp;#127;172
Pos&amp;#127;AOP&amp;#127; &amp;#127;1251&amp;#127;1089
Alc&amp;#127;ALC&amp;#127; &amp;#127;962&amp;#127;1013
;;;;

ods graphics on / reset=all  width=2.25in height=1.75in scale=off;

proc gchart data=Have;
   donut Reg  / sumvar='2017-18'n
                subgroup=Div
                noheading
                donutpct=22
			label=(h=0.7 color=black '2017-2018' justify=center 'New' justify=center 'Applicants' justify=center '(3,314)')
                nolegend
				discrete
                coutline=black
				value=inside
                ctext=black
				slice=inside
				detail_value=none
				detail_slice=none
				detail_threshold=2
				plabel=( h=0.7 color=black);
run;
quit;


ods pdf close;
&lt;/PRE&gt;</description>
      <pubDate>Fri, 24 May 2019 14:42:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/re-donut-chart/m-p/561416#M18195</guid>
      <dc:creator>twildone</dc:creator>
      <dc:date>2019-05-24T14:42:50Z</dc:date>
    </item>
    <item>
      <title>Re: re: donut chart</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/re-donut-chart/m-p/561620#M18200</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/4061"&gt;@twildone&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sorry to see that your question hasn't been answered yet. I didn't know a solution off the top of my head, but thanks to your usable sample data and code I could develop and test my ideas easily.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can define a format for variable &lt;FONT face="courier new,courier"&gt;Div&lt;/FONT&gt; whose labels in alphabetical order reflect the desired order of the internal values. For example, if you want to change the default (alphabetical) order "Alc, Pos, Sec" to "Sec, Pos, Alc", define a format like&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc format;
value $DivFmt
'Sec'='  Sec' /* two leading blanks */
'Pos'=' Pos'  /* one leading blank  */
'Alc'='Alc';  /* no  leading blank  */
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Then apply the format in the PROC GCHART step:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc gchart data=Have;
   format Div $DivFmt.;
...&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Now, the subgroups are sorted by the &lt;EM&gt;formatted&lt;/EM&gt; values of &lt;FONT face="courier new,courier"&gt;Div&lt;/FONT&gt;, which are -- in alphabetical order -- "&amp;nbsp; Sec", " Pos" and "Alc". Luckily, SAS ignores the leading blanks in the output (but honors them when sorting the subgroups), so the labels in the graph look exactly as they should -- regardless of how many leading blanks we've inserted to tweak the sort order.&lt;/P&gt;</description>
      <pubDate>Sun, 26 May 2019 15:07:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/re-donut-chart/m-p/561620#M18200</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2019-05-26T15:07:12Z</dc:date>
    </item>
    <item>
      <title>Re: re: donut chart</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/re-donut-chart/m-p/561743#M18203</link>
      <description>&lt;P&gt;Hi FreelanceReinhard….thank you for taking the time to responding to my problem. It worked....I never thought about entering blanks but was trying different things and even renaming the entries in Div so they appear in ascending order....Thanks once again...greatly appreciated&lt;/P&gt;</description>
      <pubDate>Mon, 27 May 2019 13:04:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/re-donut-chart/m-p/561743#M18203</guid>
      <dc:creator>twildone</dc:creator>
      <dc:date>2019-05-27T13:04:22Z</dc:date>
    </item>
  </channel>
</rss>

