<?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 Unicode symbol in data label attributes statement in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Unicode-symbol-in-data-label-attributes-statement/m-p/746706#M21644</link>
    <description>&lt;P&gt;Dear all,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the vline statement below, I use character variable as datalabel.&amp;nbsp;&lt;/P&gt;&lt;P&gt;This character string now contains "National average"; instead of these characters I would like to use x-bar symbol here.&amp;nbsp;&lt;BR /&gt;What is the best way to do this?&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried to use the unicode in this character variable, but as a result I just get the printed code (string of characters).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;First code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data leavetop;
set leavetop;
x2="National average= *"!!strip(round(x))!!"%";
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;Attempt with unicode:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data leavetop;
set leavetop;
x2="(*ESC*){U+0304}"!!strip(round(x))!!"%";
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;In the vline data label attribute statement I also changed the font to "GraphUnicodeText", but this didn't change much as well.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Code of the graph:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgpanel data=leavetop dattrmap=attrmap noautolegend;
panelby _NAME_/
		onepanel
		columns=1
		rows=1
		spacing=7 
		novarname 
		noborder 
		noheaderborder 
		skipemptycells
		uniscale=all
		headerbackcolor=white
		headerattrs=(color=black size=8 weight=bold family=arial);
vbar hosp/ group=countryid groupdisplay=cluster response=col2 attrid=category fill nooutline datalabel=col2 
					datalabelattrs=(color=black size=5 family=arial) DATALABELFITPOLICY=none name="include";

vline hosp /response=x lineattrs=(color=darkgrey pattern=solid thickness=2) group=countryid groupdisplay=overlay splitchar="*"
		datalabel=test datalabelpos=topright datalabelattrs=(size=5 color=black family=GraphUnicodeText) name="dropper" ;

vbar hosp/ group=countryid groupdisplay=cluster response=col2 attrid=category fillattrs=(transparency=1) nooutline datalabel=col2 
					datalabelattrs=(color=black size=5 family=arial) DATALABELFITPOLICY=none name="dropper2";

colaxis display=(noticks noline) label="Hospital" fitpolicy=rotate discreteorder=data offsetmin=0.02 offsetmax=0.02
        valueattrs= (family=arial
	                color=black
	                size=7.5
	                style=normal)
		labelattrs= (family=arial
	                color=black
	                size=9
	                style=normal
	                weight=bold);
rowaxis display=(noticks noline) label="Percent" fitpolicy=thin
		values=(0 to 100 by 20)
		valuesdisplay=("0%" "20%" "40%" "60%" "80%" "100%")
        valueattrs= (family=arial
	                color=black
	                size=7.5
	                style=normal)
        labelattrs= (family=arial
	                color=black
	                size=9
	                style=normal
	                weight=bold);
keylegend "include" /noborder autooutline autoitemsize valueattrs=(size=9 color=black family=arial weight=bold) titleattrs=(color=white) sortorder=ascending;
format _NAME_ $edutop.;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Any suggestions on how to work around this or alternatives are much appreciated.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&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>Wed, 09 Jun 2021 10:01:46 GMT</pubDate>
    <dc:creator>sidello</dc:creator>
    <dc:date>2021-06-09T10:01:46Z</dc:date>
    <item>
      <title>Unicode symbol in data label attributes statement</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Unicode-symbol-in-data-label-attributes-statement/m-p/746706#M21644</link>
      <description>&lt;P&gt;Dear all,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the vline statement below, I use character variable as datalabel.&amp;nbsp;&lt;/P&gt;&lt;P&gt;This character string now contains "National average"; instead of these characters I would like to use x-bar symbol here.&amp;nbsp;&lt;BR /&gt;What is the best way to do this?&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried to use the unicode in this character variable, but as a result I just get the printed code (string of characters).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;First code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data leavetop;
set leavetop;
x2="National average= *"!!strip(round(x))!!"%";
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;Attempt with unicode:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data leavetop;
set leavetop;
x2="(*ESC*){U+0304}"!!strip(round(x))!!"%";
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;In the vline data label attribute statement I also changed the font to "GraphUnicodeText", but this didn't change much as well.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Code of the graph:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgpanel data=leavetop dattrmap=attrmap noautolegend;
panelby _NAME_/
		onepanel
		columns=1
		rows=1
		spacing=7 
		novarname 
		noborder 
		noheaderborder 
		skipemptycells
		uniscale=all
		headerbackcolor=white
		headerattrs=(color=black size=8 weight=bold family=arial);
vbar hosp/ group=countryid groupdisplay=cluster response=col2 attrid=category fill nooutline datalabel=col2 
					datalabelattrs=(color=black size=5 family=arial) DATALABELFITPOLICY=none name="include";

vline hosp /response=x lineattrs=(color=darkgrey pattern=solid thickness=2) group=countryid groupdisplay=overlay splitchar="*"
		datalabel=test datalabelpos=topright datalabelattrs=(size=5 color=black family=GraphUnicodeText) name="dropper" ;

vbar hosp/ group=countryid groupdisplay=cluster response=col2 attrid=category fillattrs=(transparency=1) nooutline datalabel=col2 
					datalabelattrs=(color=black size=5 family=arial) DATALABELFITPOLICY=none name="dropper2";

colaxis display=(noticks noline) label="Hospital" fitpolicy=rotate discreteorder=data offsetmin=0.02 offsetmax=0.02
        valueattrs= (family=arial
	                color=black
	                size=7.5
	                style=normal)
		labelattrs= (family=arial
	                color=black
	                size=9
	                style=normal
	                weight=bold);
rowaxis display=(noticks noline) label="Percent" fitpolicy=thin
		values=(0 to 100 by 20)
		valuesdisplay=("0%" "20%" "40%" "60%" "80%" "100%")
        valueattrs= (family=arial
	                color=black
	                size=7.5
	                style=normal)
        labelattrs= (family=arial
	                color=black
	                size=9
	                style=normal
	                weight=bold);
keylegend "include" /noborder autooutline autoitemsize valueattrs=(size=9 color=black family=arial weight=bold) titleattrs=(color=white) sortorder=ascending;
format _NAME_ $edutop.;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Any suggestions on how to work around this or alternatives are much appreciated.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&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>Wed, 09 Jun 2021 10:01:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Unicode-symbol-in-data-label-attributes-statement/m-p/746706#M21644</guid>
      <dc:creator>sidello</dc:creator>
      <dc:date>2021-06-09T10:01:46Z</dc:date>
    </item>
    <item>
      <title>Re: Unicode symbol in data label attributes statement</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Unicode-symbol-in-data-label-attributes-statement/m-p/747235#M21652</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This shows you an example of how to get the X bar. The only thing is the TEXT statement is only compatible with the SCATTER statement and other similar plots. It's not compatible with the VLINE statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think perhaps if you use GTL, i.e. LAYOUT DATAPANEL, then you may be able to overlay the VLINE equivalent and the TEXTPLOT statement, and then you would be able to add the X bar label to your plot (if you used this approach).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
data prdsale2;
  set sashelp.prdsale;
  if _n_ = 1 then do;
    response_label = actual + 30;
  end;
  text = "a";
run;

proc format;
  value $UnicodeExample
    'a'= "X(*ESC*){unicode bar}";
run;

proc sgpanel data=prdsale2;
  where product in ("CHAIR" "SOFA");
  format text $UnicodeExample.;
  title "Yearly Sales by Product";
  panelby year / spacing=5 novarname;
  text x=month y=response_label text=text;
  *scatter x = month y = actual / markerattrs=(symbol=redx) group=product;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 10 Jun 2021 23:13:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Unicode-symbol-in-data-label-attributes-statement/m-p/747235#M21652</guid>
      <dc:creator>djrisks</dc:creator>
      <dc:date>2021-06-10T23:13:15Z</dc:date>
    </item>
  </channel>
</rss>

