<?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 Vbar : values with different colors in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Gchart-Vbar-values-with-different-colors/m-p/19483#M438</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I totally agree with you but I am working in a company that uses this chart for graphics, and i am automating their programs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The other problem that i have is that sometimes there are some subgroups with small values 1 or 2 so It will be better that their text labels be on the right and not inside the subgroup bar, do you see the problem?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 23 Dec 2011 13:10:12 GMT</pubDate>
    <dc:creator>kmel56</dc:creator>
    <dc:date>2011-12-23T13:10:12Z</dc:date>
    <item>
      <title>Gchart Vbar : values with different colors</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Gchart-Vbar-values-with-different-colors/m-p/19472#M427</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everybody,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am producing some Vbars with Gchart procedure, using subgroup option,it is working with no problem. Say I have 3 subgroups with 3 corresponding colors, the values for each subgroup are in black color, ana I want that for the BLUE subgroup its value be in white color , and black for the two other subgroups is this possible?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and I want the values be inside the subgroups bars, but for the Upper subgroup i Want it on the BAR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &lt;img id="smileywink" class="emoticon emoticon-smileywink" src="https://communities.sas.com/i/smilies/16x16_smiley-wink.png" alt="Smiley Wink" title="Smiley Wink" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Dec 2011 11:13:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Gchart-Vbar-values-with-different-colors/m-p/19472#M427</guid>
      <dc:creator>kmel56</dc:creator>
      <dc:date>2011-12-22T11:13:47Z</dc:date>
    </item>
    <item>
      <title>Gchart Vbar : values with different colors</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Gchart-Vbar-values-with-different-colors/m-p/19473#M428</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For gchart vbar, you can specify colors for each subgroup, using pattern statements.&lt;/P&gt;&lt;P&gt;The colors will be assigned to the subgroups/bars in alphabetic order.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is an example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pattern1 v=solid color=black;&lt;/P&gt;&lt;P&gt;pattern2 v=solid color=blue;&lt;/P&gt;&lt;P&gt;pattern3 v=solid color=black;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc gchart data=sashelp.stocks;&lt;/P&gt;&lt;P&gt;vbar stock / type=mean sumvar=close subgroup=stock;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Dec 2011 13:16:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Gchart-Vbar-values-with-different-colors/m-p/19473#M428</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2011-12-22T13:16:54Z</dc:date>
    </item>
    <item>
      <title>Gchart Vbar : values with different colors</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Gchart-Vbar-values-with-different-colors/m-p/19474#M429</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Robert thank for you answer. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe I wasn't so clear. My question wasn't about colors of subgroups( i have no problem with that) but I was meaning the values of each subgroup, say subgroup 1's value is 10, 2: 1 and 3: 15, what I want is that Value 10 for my first subgroup will be in WHITE color , and for the two other values Black color.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Dec 2011 13:22:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Gchart-Vbar-values-with-different-colors/m-p/19474#M429</guid>
      <dc:creator>kmel56</dc:creator>
      <dc:date>2011-12-22T13:22:13Z</dc:date>
    </item>
    <item>
      <title>Gchart Vbar : values with different colors</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Gchart-Vbar-values-with-different-colors/m-p/19475#M430</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I guess you'll need to provide us with an example &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Dec 2011 13:24:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Gchart-Vbar-values-with-different-colors/m-p/19475#M430</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2011-12-22T13:24:15Z</dc:date>
    </item>
    <item>
      <title>Gchart Vbar : values with different colors</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Gchart-Vbar-values-with-different-colors/m-p/19476#M431</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt; font-family: Times New Roman;"&gt;&lt;IMG height="471" id="_x0000_i1026" src="https://communities.sas.com/" width="1009" /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt; font-family: Times New Roman;"&gt;&lt;IMG height="471" id="_x0000_i1026" src="https://communities.sas.com/" width="1009" /&gt;&lt;/SPAN&gt;&lt;IMG alt="subgroup.bmp" class="jive-image-thumbnail jive-image" onclick="" src="https://communities.sas.com/legacyfs/online/1354_subgroup.bmp" width="450" /&gt;&lt;/P&gt;&lt;P&gt;So this was done on EXCEL, I want the same thing on SAS, so you see for BLUE Subgroup the values are in WHITE and for the last Subgroup"Cyan Blue" one the value is on the BAR. How can I do that please &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Dec 2011 13:42:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Gchart-Vbar-values-with-different-colors/m-p/19476#M431</guid>
      <dc:creator>kmel56</dc:creator>
      <dc:date>2011-12-22T13:42:45Z</dc:date>
    </item>
    <item>
      <title>Gchart Vbar : values with different colors</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Gchart-Vbar-values-with-different-colors/m-p/19477#M432</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ahh - you mean the text labels in the bar subgroups!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think the only way to have different colors for different ones is to annotate the labels, and assign the desired color in your annotate data set.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Dec 2011 13:48:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Gchart-Vbar-values-with-different-colors/m-p/19477#M432</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2011-12-22T13:48:00Z</dc:date>
    </item>
    <item>
      <title>Gchart Vbar : values with different colors</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Gchart-Vbar-values-with-different-colors/m-p/19478#M433</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Oh Okey, and can you give me a small example to do this with subgroups, I've never done it with subgroups:smileyplain:&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Dec 2011 13:50:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Gchart-Vbar-values-with-different-colors/m-p/19478#M433</guid>
      <dc:creator>kmel56</dc:creator>
      <dc:date>2011-12-22T13:50:45Z</dc:date>
    </item>
    <item>
      <title>Gchart Vbar : values with different colors</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Gchart-Vbar-values-with-different-colors/m-p/19479#M434</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sure!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Whereas in a typical annotate data set for most procs (such as gplot and gmap), you assign Y and X variables.&lt;/P&gt;&lt;P&gt;For a gchart vbar, you assign a Y and Midpoint variable.&lt;/P&gt;&lt;P&gt;And for a subgrouped vbar, you assign a Subgroup and a Midpoint (to place the annotated text in the subgroups).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is an example that demonstrates annotating colored text in vbar subgroups, and controlling the color based on the subgroup value:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://robslink.com/SAS/democd38/best_beer.htm"&gt;http://robslink.com/SAS/democd38/best_beer.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://robslink.com/SAS/democd38/best_beer_info.htm"&gt;http://robslink.com/SAS/democd38/best_beer_info.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Specifically, here's how I created the annotate data set:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data anno_text; set mydata;&lt;/P&gt;&lt;P&gt;length function color $8;&lt;/P&gt;&lt;P&gt;xsys='2'; ysys='2'; when='a';&lt;/P&gt;&lt;P&gt;midpoint=data_order;&lt;/P&gt;&lt;P&gt;subgroup=medal;&lt;/P&gt;&lt;P&gt;function='label';&lt;/P&gt;&lt;P&gt;position='e';&lt;/P&gt;&lt;P&gt;text=trim(left(count));&lt;/P&gt;&lt;P&gt;if medal=1 then color='yellow';&lt;/P&gt;&lt;P&gt;else if medal=2 then color='black';&lt;/P&gt;&lt;P&gt;else if medal=3 then color='brown';&lt;/P&gt;&lt;P&gt;else color='pink';&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And here's a summary of the important parts of the gchart code: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc gchart data=mydata;&lt;/P&gt;&lt;P&gt;vbar data_order / discrete&lt;/P&gt;&lt;P&gt; type=sum sumvar=count subgroup=medal&lt;/P&gt;&lt;P&gt; anno=anno_text;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Dec 2011 13:59:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Gchart-Vbar-values-with-different-colors/m-p/19479#M434</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2011-12-22T13:59:18Z</dc:date>
    </item>
    <item>
      <title>Gchart Vbar : values with different colors</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Gchart-Vbar-values-with-different-colors/m-p/19480#M435</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;WOW I wasn't beleive that superman exists, thanks a lot&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Dec 2011 14:05:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Gchart-Vbar-values-with-different-colors/m-p/19480#M435</guid>
      <dc:creator>kmel56</dc:creator>
      <dc:date>2011-12-22T14:05:31Z</dc:date>
    </item>
    <item>
      <title>Re: Gchart Vbar : values with different colors</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Gchart-Vbar-values-with-different-colors/m-p/19481#M436</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Robert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can I ask you an other small question. In fact I want that the text label for the upper subgroupe (Cyan blue and mybe another one, if the cyanblue subgroup have 0 observations) be ON the BAR and not inside, like in the excel example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried this but doesn't work :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data anno_text; set cross1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;length function color $8;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;xsys='2'; ysys='2'; when='a';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;midpoint=nat;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;subgroup=grave;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;function='label';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;position='e';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;text=trim(left(frequency));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if grave=0 then&amp;nbsp; color='white';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;else if grave=1 then do; color='black' ; XC=nat; Y=frequency+1; end;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Dec 2011 10:00:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Gchart-Vbar-values-with-different-colors/m-p/19481#M436</guid>
      <dc:creator>kmel56</dc:creator>
      <dc:date>2011-12-23T10:00:13Z</dc:date>
    </item>
    <item>
      <title>Gchart Vbar : values with different colors</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Gchart-Vbar-values-with-different-colors/m-p/19482#M437</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So, all the other subgroups will be in the bar segments, but the last one will be on top of the bar?&amp;nbsp; I think that could confuse users - they might assume the value on top of the bar is the total for the whole bar.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Dec 2011 13:08:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Gchart-Vbar-values-with-different-colors/m-p/19482#M437</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2011-12-23T13:08:08Z</dc:date>
    </item>
    <item>
      <title>Re: Gchart Vbar : values with different colors</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Gchart-Vbar-values-with-different-colors/m-p/19483#M438</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I totally agree with you but I am working in a company that uses this chart for graphics, and i am automating their programs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The other problem that i have is that sometimes there are some subgroups with small values 1 or 2 so It will be better that their text labels be on the right and not inside the subgroup bar, do you see the problem?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Dec 2011 13:10:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Gchart-Vbar-values-with-different-colors/m-p/19483#M438</guid>
      <dc:creator>kmel56</dc:creator>
      <dc:date>2011-12-23T13:10:12Z</dc:date>
    </item>
    <item>
      <title>Re: Gchart Vbar : values with different colors</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Gchart-Vbar-values-with-different-colors/m-p/245679#M8906</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am applyong the below annotation to proc gplot (in which &amp;nbsp;want to change the color of the bar not the text) but I am not getting color that I have specified. Can you please help me.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data anno_text;&lt;/P&gt;
&lt;P&gt;set data;&lt;BR /&gt;length function color $8;&lt;BR /&gt;xsys='2'; ysys='2'; when='a';&lt;BR /&gt;midpoint=dose;&lt;BR /&gt;group=dose;&lt;BR /&gt;subgroup=VAL;&lt;BR /&gt;position='e';&lt;BR /&gt;text=" ";&lt;BR /&gt;if VAL="A" then color='grey';&lt;BR /&gt;else if VAL="B" then color='blue';&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;goptions reset=all;&lt;BR /&gt;axis1 label=(angle=90 f=arial h=2 "Yaxis") value=(f=arial h=2) ; &lt;BR /&gt;axis2 label=(f=arial h=2 justify=left "Dose (mg)") value=(f=arial h=2) ;&lt;BR /&gt;axis3 label=none value=none;&lt;/P&gt;
&lt;P&gt;goptions display hby=2 fby=arial;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;PROC GCHART DATA=data;&amp;nbsp;&lt;BR /&gt; VBAR DOSE/ DISCRETE GROUP=DOSE SUBGROUP=VAL&amp;nbsp;annotate=anno_text G100 NOZERO FREQ=SUBJECT TYPE=PERCENT &lt;BR /&gt; maxis=axis2 gaxis=axis3 raxis=axis1 inside=percent width=10 space=10 gspace=5 ; &lt;BR /&gt; by DRUG;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Sun, 24 Jan 2016 07:12:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Gchart-Vbar-values-with-different-colors/m-p/245679#M8906</guid>
      <dc:creator>sfo</dc:creator>
      <dc:date>2016-01-24T07:12:58Z</dc:date>
    </item>
  </channel>
</rss>

