<?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: gchart: changing the color of one bar in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/gchart-changing-the-color-of-one-bar/m-p/20747#M512</link>
    <description>A couple of adjustments to the program I posted:&lt;BR /&gt;
1) You can remove the REPEAT=10. It is not needed.&lt;BR /&gt;
2) You will probably want to add the NOLEGEND option to the VBAR statement.&lt;BR /&gt;
&lt;BR /&gt;
Thanks!&lt;BR /&gt;
Dan</description>
    <pubDate>Thu, 21 Oct 2010 21:48:12 GMT</pubDate>
    <dc:creator>DanH_sas</dc:creator>
    <dc:date>2010-10-21T21:48:12Z</dc:date>
    <item>
      <title>gchart: changing the color of one bar</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/gchart-changing-the-color-of-one-bar/m-p/20745#M510</link>
      <description>I'm using gchart to create a bar chart.&lt;BR /&gt;
All of the bars are orange.&lt;BR /&gt;
For bu="dog" I would like the bar to be black.&lt;BR /&gt;
How do I accomplish this?&lt;BR /&gt;
Thank you.&lt;BR /&gt;
proc gchart data=goals anno=cbackanno;&lt;BR /&gt;
	hbar bu /&lt;BR /&gt;
	ascending &lt;BR /&gt;
	discrete&lt;BR /&gt;
	woutline=1&lt;BR /&gt;
	sumvar=rate&lt;BR /&gt;
	freqlabel=" " sumlabel='Total'&lt;BR /&gt;
	cframe=white&lt;BR /&gt;
	maxis=axis1&lt;BR /&gt;
	raxis=axis2&lt;BR /&gt;
	space=0.6&lt;BR /&gt;
	width=2;&lt;BR /&gt;
run;&lt;BR /&gt;
quit;</description>
      <pubDate>Thu, 21 Oct 2010 21:26:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/gchart-changing-the-color-of-one-bar/m-p/20745#M510</guid>
      <dc:creator>gzr2mz39</dc:creator>
      <dc:date>2010-10-21T21:26:30Z</dc:date>
    </item>
    <item>
      <title>Re: gchart: changing the color of one bar</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/gchart-changing-the-color-of-one-bar/m-p/20746#M511</link>
      <description>You can use a small datastep and the SUBGROUP option to do it. Make sure the color value you want black ("dog" in this case) is 0. Here is an example:&lt;BR /&gt;
&lt;BR /&gt;
[pre]&lt;BR /&gt;
data test;&lt;BR /&gt;
set sashelp.class;&lt;BR /&gt;
if age=14 then color=0;&lt;BR /&gt;
else color=1;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
pattern1 c=black;&lt;BR /&gt;
pattern2 c=orange repeat=10;&lt;BR /&gt;
&lt;BR /&gt;
proc gchart data=test;&lt;BR /&gt;
vbar age / discrete subgroup=color;&lt;BR /&gt;
run;&lt;BR /&gt;
quit;&lt;BR /&gt;
[/pre]</description>
      <pubDate>Thu, 21 Oct 2010 21:43:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/gchart-changing-the-color-of-one-bar/m-p/20746#M511</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2010-10-21T21:43:08Z</dc:date>
    </item>
    <item>
      <title>Re: gchart: changing the color of one bar</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/gchart-changing-the-color-of-one-bar/m-p/20747#M512</link>
      <description>A couple of adjustments to the program I posted:&lt;BR /&gt;
1) You can remove the REPEAT=10. It is not needed.&lt;BR /&gt;
2) You will probably want to add the NOLEGEND option to the VBAR statement.&lt;BR /&gt;
&lt;BR /&gt;
Thanks!&lt;BR /&gt;
Dan</description>
      <pubDate>Thu, 21 Oct 2010 21:48:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/gchart-changing-the-color-of-one-bar/m-p/20747#M512</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2010-10-21T21:48:12Z</dc:date>
    </item>
    <item>
      <title>Re: gchart: changing the color of one bar</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/gchart-changing-the-color-of-one-bar/m-p/20748#M513</link>
      <description>Looks good.&lt;BR /&gt;
Thank you.</description>
      <pubDate>Thu, 21 Oct 2010 21:57:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/gchart-changing-the-color-of-one-bar/m-p/20748#M513</guid>
      <dc:creator>gzr2mz39</dc:creator>
      <dc:date>2010-10-21T21:57:05Z</dc:date>
    </item>
  </channel>
</rss>

