<?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: Format not working in Gchart in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Format-not-working-in-Gchart/m-p/106063#M3919</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, I will try it on my original dataset right now&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mario&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 12 Jul 2012 17:47:36 GMT</pubDate>
    <dc:creator>mariosegal</dc:creator>
    <dc:date>2012-07-12T17:47:36Z</dc:date>
    <item>
      <title>Format not working in Gchart</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Format-not-working-in-Gchart/m-p/106061#M3917</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am having trouble creating a chart in whihc the values in the midpoint axis are defined by a format. It appars the format stops workign properly inside gchart - below is code that simulates the problem, the original exampkle was more complex with real data. The common element is the format has bands below zero, one band precisely at zero and bands above zero.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. I create a dummy dataset, save the original values and apply the format, also define the format&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;2. Then i show that tabulate can do it properly using the formatted value or applying the format&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. But then gchart can't either way, it mixes up bands&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know the answer can be, use tabulate redirected to a dataset and then use that for the chart. The reason that does not work in my case, is because then the bands are ordered alhabetically on teh chart (the band names are like '$10 to $20, $20 to $30, ... $200 to 300-&amp;gt; obviosuly I do not want the 200 to be after the 20, ). I can't also use the order on the axis atatement because the chart is quite complex (it has groups and subgroups) and requires the nozero option, which for some reason then stops the order statement (as I said this is a simplification of the problem)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can also apply the band on a data step with select, but not only is it more typing, and I also have the issu with the alpahbetical order.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone explain how to fix this, how do I properly define the format (assuming that is the problem whihc i do not believe as tabulate works)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this a bug in SAS? if so do I get a prize for finding it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/11640iFDC7E219A9FDE84A/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="gchart8.png" title="gchart8.png" /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jul 2012 17:18:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Format-not-working-in-Gchart/m-p/106061#M3917</guid>
      <dc:creator>mariosegal</dc:creator>
      <dc:date>2012-07-12T17:18:54Z</dc:date>
    </item>
    <item>
      <title>Re: Format not working in Gchart</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Format-not-working-in-Gchart/m-p/106062#M3918</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi ... add "discrete" ... produced the attached ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;proc gchart data=a;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;vbar group1 / discrete sum sumvar=value ;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;format group1 a.;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/11024i697C716E5E3CB490/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="barchart.png" title="barchart.png" /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jul 2012 17:40:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Format-not-working-in-Gchart/m-p/106062#M3918</guid>
      <dc:creator>MikeZdeb</dc:creator>
      <dc:date>2012-07-12T17:40:45Z</dc:date>
    </item>
    <item>
      <title>Re: Format not working in Gchart</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Format-not-working-in-Gchart/m-p/106063#M3919</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, I will try it on my original dataset right now&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mario&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jul 2012 17:47:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Format-not-working-in-Gchart/m-p/106063#M3919</guid>
      <dc:creator>mariosegal</dc:creator>
      <dc:date>2012-07-12T17:47:36Z</dc:date>
    </item>
    <item>
      <title>Re: Format not working in Gchart</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Format-not-working-in-Gchart/m-p/106064#M3920</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the solution did not work on my data, can someone help?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I added the actual data, the gcgart and format code to the post&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jul 2012 13:51:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Format-not-working-in-Gchart/m-p/106064#M3920</guid>
      <dc:creator>mariosegal</dc:creator>
      <dc:date>2012-07-13T13:51:19Z</dc:date>
    </item>
    <item>
      <title>Re: Format not working in Gchart</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Format-not-working-in-Gchart/m-p/106065#M3921</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Mike,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the solution did not work on my real data, I added a dataset and code - could you help me understand what is going on?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jul 2012 16:18:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Format-not-working-in-Gchart/m-p/106065#M3921</guid>
      <dc:creator>mariosegal</dc:creator>
      <dc:date>2012-07-13T16:18:18Z</dc:date>
    </item>
    <item>
      <title>Re: Format not working in Gchart</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Format-not-working-in-Gchart/m-p/106066#M3922</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ... finally had a chance to look at this.&amp;nbsp; I'm not sure why it does not work with just a format, but I got it to work by first creating a variable using the format.&amp;nbsp; The extra spaces in the labels make the bars come out in the correct order.&amp;nbsp; Using the data you posted (I used a different font and added some white space around the chart with titles and a footnote) ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;proc format;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;value clvband &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;low-&amp;lt;0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = '&amp;nbsp;&amp;nbsp;&amp;nbsp; Below Zero'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = '&amp;nbsp;&amp;nbsp;&amp;nbsp; Zero'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;0&amp;lt;-&amp;lt;250&amp;nbsp;&amp;nbsp;&amp;nbsp; = '&amp;nbsp;&amp;nbsp; Up to $250'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;250-&amp;lt;500&amp;nbsp;&amp;nbsp; = '&amp;nbsp; $250 to $500'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;500-&amp;lt;750&amp;nbsp;&amp;nbsp; = '&amp;nbsp; $500 to $750'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;750-&amp;lt;1000&amp;nbsp; = '&amp;nbsp; $750 to $1,000'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;1000-&amp;lt;1500 = '$1,000 to $1,500'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;1500-&amp;lt;2500 = '$1,500 to $2,500'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;2500-&amp;lt;5000 = '$2,500 to $5,000'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;5000-high&amp;nbsp; = '$5,000+'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;data new;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;set z.clv4 (keep=clv_total teal_flag hhs);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;newvar = put(clv_total, clvband.);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;goptions reset=all ftext='calibri/bo' htext=2 gunit=pct;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;title1 h=3&amp;nbsp; 'Total Lifetime Value (Mar 2012)' ls=2;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;title2 a=90 ls=1;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;title3 a=-90 ls=1;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;footnote1 ls=1;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;axis1 minor=none color=black label=(a = 90 "Average Amount")&amp;nbsp;&amp;nbsp; split=" "&amp;nbsp; ;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;axis2 split=" " value=(h=1.75) label=none;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;axis3 split=" " label=none value=none;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;legend1 label=none;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;proc gchart data=new;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;vbar newvar / type=percent freq=hhs group=newvar inside=subpct g100 subgroup=teal_flag &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; raxis = axis1 maxis=axis3 gaxis=axis2 legend=legend1 nozeros noframe;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;quit;&lt;/STRONG&gt;&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/10656i1E50564DA35BC13D/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="gchart.png" title="gchart.png" /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jul 2012 15:44:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Format-not-working-in-Gchart/m-p/106066#M3922</guid>
      <dc:creator>MikeZdeb</dc:creator>
      <dc:date>2012-07-31T15:44:23Z</dc:date>
    </item>
    <item>
      <title>Re: Format not working in Gchart</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Format-not-working-in-Gchart/m-p/106067#M3923</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot. I do not know why it does not work. I solved it by creating the zero band to be 0-&amp;lt;1, which happens to be ok for my data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;incidentally, as it was it works perfectly in tabulate, so one would expect it to work on gchart, but it does not&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SAS has aknowledged this is a defect and say they will work to fix it&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mario&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jul 2012 18:12:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Format-not-working-in-Gchart/m-p/106067#M3923</guid>
      <dc:creator>mariosegal</dc:creator>
      <dc:date>2012-07-31T18:12:07Z</dc:date>
    </item>
  </channel>
</rss>

