<?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: Question coloring VBars of Midpoints in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Question-coloring-VBars-of-Midpoints/m-p/660114#M20086</link>
    <description>&lt;P&gt;It's a bit 'cumbersome' matching specific colors to specific bar segments in gchart, but here's one way to do it...&lt;/P&gt;
&lt;P&gt;(assuming you have the exact same number of bar segments each time you run the graph)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data tmp_grafikdaten_x;&lt;BR /&gt;length rs_erl $5;&lt;BR /&gt;length kattxt $10;&lt;BR /&gt;input rs_erl stack_order kattxt anzahl;&lt;BR /&gt;datalines;&lt;BR /&gt;RS 1 rs1 3&lt;BR /&gt;RS 2 rs2 2&lt;BR /&gt;RS 3 rs3 1&lt;BR /&gt;ERL 4 erl1 1&lt;BR /&gt;ERL 5 erl2 1&lt;BR /&gt;ERL 6 erl3 3&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc sql noprint;&lt;BR /&gt;create table control as&lt;BR /&gt;select unique stack_order as start, kattxt as label&lt;BR /&gt;from tmp_grafikdaten_x;&lt;BR /&gt;quit; run;&lt;BR /&gt;data control; set control;&lt;BR /&gt;fmtname='stkfmt';&lt;BR /&gt;type='N';&lt;BR /&gt;run;proc format lib=work cntlin=control;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;legend1 position=(middle left) across=2 mode=share &lt;BR /&gt;label=(position=top justify=center) colmajor;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;pattern1 v=s c=pink;&lt;BR /&gt;pattern2 v=s c=red;&lt;BR /&gt;pattern3 v=s c=firebrick;&lt;BR /&gt;pattern4 v=s c=cxddddff;&lt;BR /&gt;pattern5 v=s c=dodgerblue;&lt;BR /&gt;pattern6 v=s c=navy;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;axis1 label=none;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;title "controlling colors in gchart vbar";&lt;BR /&gt;proc gchart data= tmp_Grafikdaten_X (where=(RS_ERL in( "RS", "ERL") )) ;&lt;BR /&gt;format stack_order stkfmt.;&lt;BR /&gt;vbar rs_erl / type=sum sumvar=anzahl legend=legend1&lt;BR /&gt;subgroup=stack_order width=10pct space=5pct maxis=axis1;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="bar_colors.png" style="width: 800px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/43951i307D8A895CB6D1D1/image-size/large?v=v2&amp;amp;px=999" role="button" title="bar_colors.png" alt="bar_colors.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 16 Jun 2020 17:03:45 GMT</pubDate>
    <dc:creator>GraphGuy</dc:creator>
    <dc:date>2020-06-16T17:03:45Z</dc:date>
    <item>
      <title>Question coloring VBars of Midpoints</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Question-coloring-VBars-of-Midpoints/m-p/659043#M20067</link>
      <description>&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;I'm a very new graphics-user and I hope my question is not too boring for you:&lt;/P&gt;&lt;P&gt;I have a proc gchart&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;legend1 frame&lt;BR /&gt;label=("Prio:" position=top justify=center)&lt;BR /&gt;position=(middle right outside)&lt;BR /&gt;mode=protect&lt;BR /&gt;across=1;&lt;/P&gt;&lt;P&gt;proc gchart data= tmp_Grafikdaten_X (where=(RS_ERL in( "RS", "ERL") )) ;&lt;BR /&gt;format anzahl 8. ;&lt;BR /&gt;format Datum date9.;&lt;BR /&gt;VBAR RS_ERL /&lt;BR /&gt;sumvar = Anzahl&lt;BR /&gt;TYPE=SUM&lt;BR /&gt;midpoints="RS" "ERL"&lt;BR /&gt;group=datum&lt;BR /&gt;subgroup=kattxt&lt;BR /&gt;legend=legend1&lt;BR /&gt;RAXIS=AXIS1&lt;BR /&gt;MAXIS=AXIS2&lt;BR /&gt;GAxis=axis3&amp;nbsp;&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and I would like to color the bars of the 2 midpoints in different color schemes. For example the subgroups of midpoint RS should be shown in blue tones and midpoint ERL should be shown in red tones.&lt;/P&gt;&lt;P&gt;Is this possible?&lt;/P&gt;&lt;P&gt;And if it is possible, how&amp;nbsp; can I output the legend accordingly?&lt;/P&gt;&lt;P&gt;Many thanks for all hints!&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jun 2020 16:38:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Question-coloring-VBars-of-Midpoints/m-p/659043#M20067</guid>
      <dc:creator>SonjaStahl</dc:creator>
      <dc:date>2020-06-15T16:38:45Z</dc:date>
    </item>
    <item>
      <title>Re: Question coloring VBars of Midpoints</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Question-coloring-VBars-of-Midpoints/m-p/659061#M20072</link>
      <description>&lt;P&gt;Without some actual data I wouldn't promise it is possible with GCHART. &lt;BR /&gt;As a minimum that can involve a lot of Symbol statements that are dependent on data value order.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Proc SGPLOT has an option DATTRMAP that lets you set characteristics per formatted value of a Group variable and would be where I was going.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jun 2020 17:15:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Question-coloring-VBars-of-Midpoints/m-p/659061#M20072</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-06-15T17:15:27Z</dc:date>
    </item>
    <item>
      <title>Re: Question coloring VBars of Midpoints</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Question-coloring-VBars-of-Midpoints/m-p/659646#M20079</link>
      <description>&lt;P&gt;Thank you for the hint. But there is no subgroup-option, isn't it?&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jun 2020 08:03:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Question-coloring-VBars-of-Midpoints/m-p/659646#M20079</guid>
      <dc:creator>SonjaStahl</dc:creator>
      <dc:date>2020-06-16T08:03:42Z</dc:date>
    </item>
    <item>
      <title>Re: Question coloring VBars of Midpoints</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Question-coloring-VBars-of-Midpoints/m-p/660114#M20086</link>
      <description>&lt;P&gt;It's a bit 'cumbersome' matching specific colors to specific bar segments in gchart, but here's one way to do it...&lt;/P&gt;
&lt;P&gt;(assuming you have the exact same number of bar segments each time you run the graph)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data tmp_grafikdaten_x;&lt;BR /&gt;length rs_erl $5;&lt;BR /&gt;length kattxt $10;&lt;BR /&gt;input rs_erl stack_order kattxt anzahl;&lt;BR /&gt;datalines;&lt;BR /&gt;RS 1 rs1 3&lt;BR /&gt;RS 2 rs2 2&lt;BR /&gt;RS 3 rs3 1&lt;BR /&gt;ERL 4 erl1 1&lt;BR /&gt;ERL 5 erl2 1&lt;BR /&gt;ERL 6 erl3 3&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc sql noprint;&lt;BR /&gt;create table control as&lt;BR /&gt;select unique stack_order as start, kattxt as label&lt;BR /&gt;from tmp_grafikdaten_x;&lt;BR /&gt;quit; run;&lt;BR /&gt;data control; set control;&lt;BR /&gt;fmtname='stkfmt';&lt;BR /&gt;type='N';&lt;BR /&gt;run;proc format lib=work cntlin=control;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;legend1 position=(middle left) across=2 mode=share &lt;BR /&gt;label=(position=top justify=center) colmajor;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;pattern1 v=s c=pink;&lt;BR /&gt;pattern2 v=s c=red;&lt;BR /&gt;pattern3 v=s c=firebrick;&lt;BR /&gt;pattern4 v=s c=cxddddff;&lt;BR /&gt;pattern5 v=s c=dodgerblue;&lt;BR /&gt;pattern6 v=s c=navy;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;axis1 label=none;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;title "controlling colors in gchart vbar";&lt;BR /&gt;proc gchart data= tmp_Grafikdaten_X (where=(RS_ERL in( "RS", "ERL") )) ;&lt;BR /&gt;format stack_order stkfmt.;&lt;BR /&gt;vbar rs_erl / type=sum sumvar=anzahl legend=legend1&lt;BR /&gt;subgroup=stack_order width=10pct space=5pct maxis=axis1;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="bar_colors.png" style="width: 800px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/43951i307D8A895CB6D1D1/image-size/large?v=v2&amp;amp;px=999" role="button" title="bar_colors.png" alt="bar_colors.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jun 2020 17:03:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Question-coloring-VBars-of-Midpoints/m-p/660114#M20086</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2020-06-16T17:03:45Z</dc:date>
    </item>
    <item>
      <title>Re: Question coloring VBars of Midpoints</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Question-coloring-VBars-of-Midpoints/m-p/661719#M20090</link>
      <description>&lt;P&gt;Thanks a lot, this is exactly what I wanted!&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jun 2020 12:34:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Question-coloring-VBars-of-Midpoints/m-p/661719#M20090</guid>
      <dc:creator>SonjaStahl</dc:creator>
      <dc:date>2020-06-17T12:34:56Z</dc:date>
    </item>
  </channel>
</rss>

