<?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: Splitting text in two lines using annotion dataset in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Splitting-text-in-two-lines-using-annotion-dataset/m-p/246215#M8921</link>
    <description>&lt;P&gt;You may want to be a bit more explicit about what you are attempting to accomplish.&lt;/P&gt;
&lt;P&gt;Do mean is there a way to automatically wrap text? Or to separate the text beforehand and display two variables with the same location information? Or is this to appear in a tool-tip or similar popup?&lt;/P&gt;</description>
    <pubDate>Tue, 26 Jan 2016 20:47:44 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2016-01-26T20:47:44Z</dc:date>
    <item>
      <title>Splitting text in two lines using annotion dataset</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Splitting-text-in-two-lines-using-annotion-dataset/m-p/246199#M8920</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there an option usiung which I can split the text in two lines in an annotation dataset?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jan 2016 19:46:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Splitting-text-in-two-lines-using-annotion-dataset/m-p/246199#M8920</guid>
      <dc:creator>sfo</dc:creator>
      <dc:date>2016-01-26T19:46:31Z</dc:date>
    </item>
    <item>
      <title>Re: Splitting text in two lines using annotion dataset</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Splitting-text-in-two-lines-using-annotion-dataset/m-p/246215#M8921</link>
      <description>&lt;P&gt;You may want to be a bit more explicit about what you are attempting to accomplish.&lt;/P&gt;
&lt;P&gt;Do mean is there a way to automatically wrap text? Or to separate the text beforehand and display two variables with the same location information? Or is this to appear in a tool-tip or similar popup?&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jan 2016 20:47:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Splitting-text-in-two-lines-using-annotion-dataset/m-p/246215#M8921</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-01-26T20:47:44Z</dc:date>
    </item>
    <item>
      <title>Re: Splitting text in two lines using annotion dataset</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Splitting-text-in-two-lines-using-annotion-dataset/m-p/246235#M8923</link>
      <description>&lt;P&gt;If you are using SG annotation with SG procedures, the text string will always get wrapped within the WIDTH parameter on white space.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jan 2016 21:50:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Splitting-text-in-two-lines-using-annotion-dataset/m-p/246235#M8923</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2016-01-26T21:50:09Z</dc:date>
    </item>
    <item>
      <title>Re: Splitting text in two lines using annotion dataset</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Splitting-text-in-two-lines-using-annotion-dataset/m-p/246236#M8924</link>
      <description>&lt;P&gt;&lt;SPAN&gt;separate the text beforehand and display two variables with the same location information should solve my problem.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;For example, &amp;nbsp;I am displaying the number 14% (1/7) using the annotation in proc gchart. Is there a way these can be split in two lines?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/12238i063A944F110ADD2F/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="1-26-2016 2-07-22 PM.png" title="1-26-2016 2-07-22 PM.png" /&gt;</description>
      <pubDate>Tue, 26 Jan 2016 22:10:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Splitting-text-in-two-lines-using-annotion-dataset/m-p/246236#M8924</guid>
      <dc:creator>sfo</dc:creator>
      <dc:date>2016-01-26T22:10:52Z</dc:date>
    </item>
    <item>
      <title>Re: Splitting text in two lines using annotion dataset</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Splitting-text-in-two-lines-using-annotion-dataset/m-p/246237#M8925</link>
      <description>&lt;P&gt;Provide some minimal data in the form of a data step and the code you are currently using and we'll see if we can get what you want. It helps to know what you've done so far.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Modifying the example from &lt;A href="http://support.sas.com/kb/45/056.html" target="_blank"&gt;http://support.sas.com/kb/45/056.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;The code below 1) adds another statistic 2) modifies the position of the first value and 3) adds value and position for second statistic to the annotate data set&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;/* Sum the total sales by product for each country */                                                                                   
proc sort data=sashelp.prdsale out=prdsale;                                                                                             
   by product country;                                                                                                                  
run;                                                                                                                                    
proc means data=prdsale noprint;                                                                                                        
   by product country;                                                                                                                  
   var actual;                                                                                                                          
   output out=meansout sum=actual_sum std=sTD; /*&amp;lt;= new statistic*/                                                                                                 
run;                                                                                                                                    
                                                                                                                                        
/* Create an Annotate data set to draw  */                                                                                              
/* the summed values for each subgroup. */                                                                                              
data barlabel;                                                                                                                          
   length function color $8 text $ 16;                                                                                                            
   retain xsys ysys '2' color 'black' when 'a';                                                                                         
   set meansout;                                                                                                                        
                                                                                                                                        
   function='label';                                                                                                                    
   midpoint=product;                                                                                                                    
   subgroup=country;                                                                                                                    
   position='A'; /*&amp;lt;=change position from original*/                                                                                                                       
   text=trim(left(put(actual_sum,dollar8.0)));  
   output; /*&amp;lt;= force output of first part of labe text*/
   function='label';    /* from here down add second value for same input record*/                                                                                                                
   midpoint=product;                                                                                                                    
   subgroup=country;                                                                                                                    
   position='D';       /*complementary position to above*/                                                                                                                 
   text=cats('STD=',put(std,dollar8.2));  
   output;
run;                                                                                                                                    
                                                                                                                                        
/* Define the title */                                                                                                                  
title1 "Label the Subgroups in a Horizontal Bar Chart";                                                                                 
                                                                                                                                        
/* Define the axis characteristics */                                                                                                   
axis1 label=(angle=90 "Product")                                                                                                        
      value=(justify=right);                                                                                                            
axis2 label=("Actual Sales")                                                                                                            
      order=(0 to 160000 by 40000)                                                                                                      
      minor=(n=3);                                                                                                                      
                                                                                                                                        
/* Define legend options */                                                                                                         
legend1 frame;                                                                                                                          
                                                                                                                                        
/* Generate the graph */                                                                                                                
proc gchart data=sashelp.prdsale;                                                                                                       
   hbar product / subgroup=country                                                                                                      
                  sumvar=actual                                                                                                         
                  legend=legend1                                                                                                        
                  nostats                                                                                                               
                  maxis=axis1                                                                                                           
                  raxis=axis2                                                                                                           
                  annotate=barlabel;                                                                                                    
   format actual dollar8.0;                                                                                                             
run;                                                                                                                                    
quit; title;&lt;/PRE&gt;</description>
      <pubDate>Tue, 26 Jan 2016 22:38:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Splitting-text-in-two-lines-using-annotion-dataset/m-p/246237#M8925</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-01-26T22:38:42Z</dc:date>
    </item>
    <item>
      <title>Re: Splitting text in two lines using annotion dataset</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Splitting-text-in-two-lines-using-annotion-dataset/m-p/246278#M8929</link>
      <description>&lt;P&gt;Thanks your examle code is really helpful. Just one problem, is there a way we can define 1 1/2 cell below center?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I used&amp;nbsp;position='E'; &amp;nbsp;and&amp;nbsp;position='8'; &amp;nbsp;and getting the attached. How can I add space between the lines?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks a lot for your help!!&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/12239iFD07ADB4F748B1B2/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="pic.png" title="pic.png" /&gt;</description>
      <pubDate>Wed, 27 Jan 2016 04:48:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Splitting-text-in-two-lines-using-annotion-dataset/m-p/246278#M8929</guid>
      <dc:creator>sfo</dc:creator>
      <dc:date>2016-01-27T04:48:03Z</dc:date>
    </item>
    <item>
      <title>Re: Splitting text in two lines using annotion dataset</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Splitting-text-in-two-lines-using-annotion-dataset/m-p/246402#M8940</link>
      <description>Since E is below and 8 is below I'm not surprised you get a collision. Instead  would try 5 and then 2 for the top with 8 in the bottom. If that doesn't quite work I might try a combination of a Left position(1,4,7,A) for the top and then a right position (9 or F)</description>
      <pubDate>Wed, 27 Jan 2016 17:07:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Splitting-text-in-two-lines-using-annotion-dataset/m-p/246402#M8940</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-01-27T17:07:04Z</dc:date>
    </item>
    <item>
      <title>Re: Splitting text in two lines using annotion dataset</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Splitting-text-in-two-lines-using-annotion-dataset/m-p/246451#M8941</link>
      <description>&lt;P&gt;Thanks but I am little unclear of how to apply combination of positions for example you said&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;-&amp;nbsp;&lt;SPAN&gt;try 5 and then 2 for the top.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;-&amp;nbsp;combination of a Left position(1,4,7,A) for the top&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jan 2016 20:31:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Splitting-text-in-two-lines-using-annotion-dataset/m-p/246451#M8941</guid>
      <dc:creator>sfo</dc:creator>
      <dc:date>2016-01-27T20:31:27Z</dc:date>
    </item>
    <item>
      <title>Re: Splitting text in two lines using annotion dataset</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Splitting-text-in-two-lines-using-annotion-dataset/m-p/246476#M8942</link>
      <description>&lt;P&gt;Show the code you are using for your annotate data set.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jan 2016 21:28:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Splitting-text-in-two-lines-using-annotion-dataset/m-p/246476#M8942</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-01-27T21:28:55Z</dc:date>
    </item>
    <item>
      <title>Re: Splitting text in two lines using annotion dataset</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Splitting-text-in-two-lines-using-annotion-dataset/m-p/246490#M8943</link>
      <description>&lt;P&gt;data barlabel; &lt;BR /&gt; length function $8; &lt;BR /&gt; retain style '"arial/bo"' xsys ysys '2' when 'a' size 1.5;&lt;/P&gt;
&lt;P&gt;set barval; &lt;BR /&gt; &lt;BR /&gt; function='label'; &lt;BR /&gt; midpoint=dose; &lt;BR /&gt; subgroup=avalc; &lt;BR /&gt; group=dose; &lt;BR /&gt; position='5'; &lt;BR /&gt; text=strip(round(trim(num)/trim(den)*100) || '%'); output;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt; function='label'; &lt;BR /&gt; midpoint=dose; &lt;BR /&gt; subgroup=avalc; &lt;BR /&gt; group=dose; &lt;BR /&gt; position='8'; &lt;BR /&gt; text='('||strip(num)||'/'||strip(den)||')'; output;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jan 2016 21:56:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Splitting-text-in-two-lines-using-annotion-dataset/m-p/246490#M8943</guid>
      <dc:creator>sfo</dc:creator>
      <dc:date>2016-01-27T21:56:17Z</dc:date>
    </item>
    <item>
      <title>Re: Splitting text in two lines using annotion dataset</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Splitting-text-in-two-lines-using-annotion-dataset/m-p/246718#M8944</link>
      <description>&lt;P&gt;HI&amp;nbsp;&lt;SPAN class="login-bold"&gt;&lt;A id="link_46" class="lia-link-navigation lia-page-link lia-user-name-link" href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884" target="_self"&gt;ballardw&lt;/A&gt;,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="login-bold"&gt;Any suggestion after seeing my annotation code?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="login-bold"&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jan 2016 18:41:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Splitting-text-in-two-lines-using-annotion-dataset/m-p/246718#M8944</guid>
      <dc:creator>sfo</dc:creator>
      <dc:date>2016-01-28T18:41:55Z</dc:date>
    </item>
  </channel>
</rss>

