<?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: Long labels on a grouped barchart in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Long-labels-on-a-grouped-barchart/m-p/73460#M2674</link>
    <description>Hi:&lt;BR /&gt;
  I think that "tickvaluefitpolicy" may belong to the Graph Template Language. If you look at the COLAXIS doc, you will find a FITPOLICY option:&lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/cdl/en/grstatproc/61948/HTML/default/panelaxis-stmt.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/grstatproc/61948/HTML/default/panelaxis-stmt.htm&lt;/A&gt;&lt;BR /&gt;
 &lt;BR /&gt;
  FITPOLICY only comes into play when/if the axis labels don't fit. (FITPOLICY has no impact on the PANELBY text.) So, for example, if I modify your program to use FITPOLICY, it will only rotate the axis value labels if they are too long to fit (which I forced them to be too long with a user-defined format.)&lt;BR /&gt;
 &lt;BR /&gt;
  When I use a too long PANELBY value, then I do see the ... ellipsis if the text is too long. I used a variety of different strings and you can see that the number of characters in the PANELBY cell will depend on how wide the letters/numbers are and how many characters will fit, based on the current font being used. You could probably change the font being used for the PANELBY text with a style template change, but I fear that you will run the risk of having the text too small to read.&lt;BR /&gt;
 &lt;BR /&gt;
cynthia&lt;BR /&gt;
[pre]&lt;BR /&gt;
data test;&lt;BR /&gt;
  set sashelp.prdsale;&lt;BR /&gt;
  if region = 'EAST' then text = 'abcdefghijklmnopqrstuvwxyz1234567890';&lt;BR /&gt;
  else text = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890';&lt;BR /&gt;
  output;&lt;BR /&gt;
  if region = 'EAST' then text = 'xyxyxyxyxyxyxyxyxyxyxyxyxy1234567890';&lt;BR /&gt;
  else text = '1234567890123456789012345678901234567890';&lt;BR /&gt;
  output;&lt;BR /&gt;
run;&lt;BR /&gt;
                                &lt;BR /&gt;
proc format;&lt;BR /&gt;
  value $lprd 'BED' = 'LONGBED'&lt;BR /&gt;
              'SOFA' = 'LONGSOFA'&lt;BR /&gt;
              'CHAIR' = 'LONGCHAIR'&lt;BR /&gt;
              'TABLE' = 'LONGTABLE'&lt;BR /&gt;
              'DESK' = 'LONGDESK';&lt;BR /&gt;
run;&lt;BR /&gt;
                              &lt;BR /&gt;
proc sgpanel data=test; &lt;BR /&gt;
title '1) With FITPOLICY';&lt;BR /&gt;
  where year=1993; &lt;BR /&gt;
  panelby text / novarname; &lt;BR /&gt;
  rowaxis label="Sales"; &lt;BR /&gt;
  colaxis fitpolicy=rotate; &lt;BR /&gt;
  vbar product / response=actual &lt;BR /&gt;
                 group=product; &lt;BR /&gt;
  keylegend / position=right; &lt;BR /&gt;
  format product $lprd.;&lt;BR /&gt;
run; &lt;BR /&gt;
[/pre]</description>
    <pubDate>Thu, 01 Oct 2009 22:43:14 GMT</pubDate>
    <dc:creator>Cynthia_sas</dc:creator>
    <dc:date>2009-10-01T22:43:14Z</dc:date>
    <item>
      <title>Long labels on a grouped barchart</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Long-labels-on-a-grouped-barchart/m-p/73459#M2673</link>
      <description>Hi&lt;BR /&gt;
&lt;BR /&gt;
I have a grouped bar chart where one of the axis has very long labels. The labels are cut and replaced by ...&lt;BR /&gt;
&lt;BR /&gt;
I saw that there is an option tickvaluefitpolicy = rotate, but I am not sure where to put the option. I have tried on the colaxis, but it doesn´t work. &lt;BR /&gt;
&lt;BR /&gt;
Any suggestions?&lt;BR /&gt;
&lt;BR /&gt;
Tks&lt;BR /&gt;
Jenny&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Here is an example:&lt;BR /&gt;
&lt;BR /&gt;
data test;&lt;BR /&gt;
  set sashelp.prdsale;&lt;BR /&gt;
  if region = 'EAST' then text = 'This is the first really long ';&lt;BR /&gt;
  else text = 'This is the second really long';&lt;BR /&gt;
  output;&lt;BR /&gt;
if region = 'EAST' then text = 'This is the third really long';&lt;BR /&gt;
  else text = 'This is the fourth really long';&lt;BR /&gt;
  output;&lt;BR /&gt;
&lt;BR /&gt;
  &lt;BR /&gt;
  run;&lt;BR /&gt;
&lt;BR /&gt;
proc sgpanel data=test; &lt;BR /&gt;
  where year=1993; &lt;BR /&gt;
  panelby text / onepanel  &lt;BR /&gt;
          novarname noborder  &lt;BR /&gt;
          layout=columnlattice  &lt;BR /&gt;
          colheaderpos=bottom; &lt;BR /&gt;
  rowaxis label="Sales"; &lt;BR /&gt;
  colaxis display=none; &lt;BR /&gt;
  vbar product / response=actual  &lt;BR /&gt;
                 group=product; &lt;BR /&gt;
  keylegend / position=right; &lt;BR /&gt;
run;</description>
      <pubDate>Mon, 28 Sep 2009 15:17:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Long-labels-on-a-grouped-barchart/m-p/73459#M2673</guid>
      <dc:creator>Jennys</dc:creator>
      <dc:date>2009-09-28T15:17:08Z</dc:date>
    </item>
    <item>
      <title>Re: Long labels on a grouped barchart</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Long-labels-on-a-grouped-barchart/m-p/73460#M2674</link>
      <description>Hi:&lt;BR /&gt;
  I think that "tickvaluefitpolicy" may belong to the Graph Template Language. If you look at the COLAXIS doc, you will find a FITPOLICY option:&lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/cdl/en/grstatproc/61948/HTML/default/panelaxis-stmt.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/grstatproc/61948/HTML/default/panelaxis-stmt.htm&lt;/A&gt;&lt;BR /&gt;
 &lt;BR /&gt;
  FITPOLICY only comes into play when/if the axis labels don't fit. (FITPOLICY has no impact on the PANELBY text.) So, for example, if I modify your program to use FITPOLICY, it will only rotate the axis value labels if they are too long to fit (which I forced them to be too long with a user-defined format.)&lt;BR /&gt;
 &lt;BR /&gt;
  When I use a too long PANELBY value, then I do see the ... ellipsis if the text is too long. I used a variety of different strings and you can see that the number of characters in the PANELBY cell will depend on how wide the letters/numbers are and how many characters will fit, based on the current font being used. You could probably change the font being used for the PANELBY text with a style template change, but I fear that you will run the risk of having the text too small to read.&lt;BR /&gt;
 &lt;BR /&gt;
cynthia&lt;BR /&gt;
[pre]&lt;BR /&gt;
data test;&lt;BR /&gt;
  set sashelp.prdsale;&lt;BR /&gt;
  if region = 'EAST' then text = 'abcdefghijklmnopqrstuvwxyz1234567890';&lt;BR /&gt;
  else text = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890';&lt;BR /&gt;
  output;&lt;BR /&gt;
  if region = 'EAST' then text = 'xyxyxyxyxyxyxyxyxyxyxyxyxy1234567890';&lt;BR /&gt;
  else text = '1234567890123456789012345678901234567890';&lt;BR /&gt;
  output;&lt;BR /&gt;
run;&lt;BR /&gt;
                                &lt;BR /&gt;
proc format;&lt;BR /&gt;
  value $lprd 'BED' = 'LONGBED'&lt;BR /&gt;
              'SOFA' = 'LONGSOFA'&lt;BR /&gt;
              'CHAIR' = 'LONGCHAIR'&lt;BR /&gt;
              'TABLE' = 'LONGTABLE'&lt;BR /&gt;
              'DESK' = 'LONGDESK';&lt;BR /&gt;
run;&lt;BR /&gt;
                              &lt;BR /&gt;
proc sgpanel data=test; &lt;BR /&gt;
title '1) With FITPOLICY';&lt;BR /&gt;
  where year=1993; &lt;BR /&gt;
  panelby text / novarname; &lt;BR /&gt;
  rowaxis label="Sales"; &lt;BR /&gt;
  colaxis fitpolicy=rotate; &lt;BR /&gt;
  vbar product / response=actual &lt;BR /&gt;
                 group=product; &lt;BR /&gt;
  keylegend / position=right; &lt;BR /&gt;
  format product $lprd.;&lt;BR /&gt;
run; &lt;BR /&gt;
[/pre]</description>
      <pubDate>Thu, 01 Oct 2009 22:43:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Long-labels-on-a-grouped-barchart/m-p/73460#M2674</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2009-10-01T22:43:14Z</dc:date>
    </item>
    <item>
      <title>Re: Long labels on a grouped barchart</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Long-labels-on-a-grouped-barchart/m-p/73461#M2675</link>
      <description>You could use good-old traditional gchart, instead  &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;
And in v9.2, gchart even supports &amp;gt;32-character bar/midpoint text.&lt;BR /&gt;
Here is some code to do the similar plot:&lt;BR /&gt;
&lt;BR /&gt;
axis1 label=none value=none;&lt;BR /&gt;
axis2 label=none value=(j=right);&lt;BR /&gt;
&lt;BR /&gt;
proc gchart data=test (where=(year=1993));&lt;BR /&gt;
 hbar product / type=sum sumvar=actual nostats&lt;BR /&gt;
 subgroup=product maxis=axis1 gaxis=axis2&lt;BR /&gt;
 group=text space=0;&lt;BR /&gt;
run;</description>
      <pubDate>Fri, 09 Oct 2009 13:17:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Long-labels-on-a-grouped-barchart/m-p/73461#M2675</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2009-10-09T13:17:13Z</dc:date>
    </item>
  </channel>
</rss>

