<?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 stacked bar chart with groups having different color scales in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/stacked-bar-chart-with-groups-having-different-color-scales/m-p/693270#M20587</link>
    <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I have created the below graph&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Manj_0-1603303536255.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/50883iD76AF26C9E6278F9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Manj_0-1603303536255.png" alt="Manj_0-1603303536255.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;My code below:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;proc template;&lt;BR /&gt;define statgraph bar100;&lt;BR /&gt;begingraph / datacolors=(white lightgrey darkgrey grey black) datacontrastcolors= (black black black black black);&lt;BR /&gt;&lt;BR /&gt;layout datalattice columnvar=trt01p /&lt;BR /&gt;columns=2 rows=1 columndatarange=union headerlabeldisplay=none /*columnheaders=BOTTOM headerlabeldisplay=value headerlabellocation=inside*/&lt;/P&gt;&lt;P&gt;rowaxisopts=(display=all label='Percentage of Patients' linearopts=(viewmin=0 viewmax=100 tickvaluesequence=(start=0 end=100 increment=10) viewmin=0 viewmax=100 tickvalueformat =pct.))&lt;BR /&gt;columnaxisopts=(display=(tickvalues) );&lt;/P&gt;&lt;P&gt;layout prototype / cycleattrs=true;&lt;BR /&gt;BARCHARTPARM X = avisit y=percent / group=avalc name="lgnd1" ;&lt;BR /&gt;&lt;BR /&gt;innermargin / align=bottom opaque=true separator=True;&lt;BR /&gt;axistable x=avisit value=count/ display=(label) classdisplay=stack class=avalc classorder=descending labelposition=max position=1 pad=1 ;&lt;BR /&gt;endinnermargin;&lt;BR /&gt;&lt;BR /&gt;endlayout;&lt;/P&gt;&lt;P&gt;sidebar / align=bottom;&lt;BR /&gt;entry halign=center "&amp;amp;trt1 | &amp;amp;trt2 " /opaque=true border=true borderattrs=(color=black) backgroundcolor=lightgrey textattrs=(COLOR=black size=8 ) ;&lt;BR /&gt;endsidebar;&lt;/P&gt;&lt;P&gt;sidebar / align=bottom;&lt;BR /&gt;discretelegend "lgnd1" /valign=bottom location=outside down=1 sortorder=ASCENDINGFORMATTED title='PGI-S response categories:' ;&lt;BR /&gt;endsidebar;&lt;/P&gt;&lt;P&gt;endlayout;&lt;/P&gt;&lt;P&gt;endgraph;&lt;BR /&gt;end;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;proc sgrender data=g100 template=bar100 ;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;At present both left panel and the right panel has the colours on grey scale. How do I Keep the left panel colors as it is and the right panel colors on stack varies from white to red?&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;</description>
    <pubDate>Wed, 21 Oct 2020 18:10:51 GMT</pubDate>
    <dc:creator>Manj</dc:creator>
    <dc:date>2020-10-21T18:10:51Z</dc:date>
    <item>
      <title>stacked bar chart with groups having different color scales</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/stacked-bar-chart-with-groups-having-different-color-scales/m-p/693270#M20587</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I have created the below graph&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Manj_0-1603303536255.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/50883iD76AF26C9E6278F9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Manj_0-1603303536255.png" alt="Manj_0-1603303536255.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;My code below:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;proc template;&lt;BR /&gt;define statgraph bar100;&lt;BR /&gt;begingraph / datacolors=(white lightgrey darkgrey grey black) datacontrastcolors= (black black black black black);&lt;BR /&gt;&lt;BR /&gt;layout datalattice columnvar=trt01p /&lt;BR /&gt;columns=2 rows=1 columndatarange=union headerlabeldisplay=none /*columnheaders=BOTTOM headerlabeldisplay=value headerlabellocation=inside*/&lt;/P&gt;&lt;P&gt;rowaxisopts=(display=all label='Percentage of Patients' linearopts=(viewmin=0 viewmax=100 tickvaluesequence=(start=0 end=100 increment=10) viewmin=0 viewmax=100 tickvalueformat =pct.))&lt;BR /&gt;columnaxisopts=(display=(tickvalues) );&lt;/P&gt;&lt;P&gt;layout prototype / cycleattrs=true;&lt;BR /&gt;BARCHARTPARM X = avisit y=percent / group=avalc name="lgnd1" ;&lt;BR /&gt;&lt;BR /&gt;innermargin / align=bottom opaque=true separator=True;&lt;BR /&gt;axistable x=avisit value=count/ display=(label) classdisplay=stack class=avalc classorder=descending labelposition=max position=1 pad=1 ;&lt;BR /&gt;endinnermargin;&lt;BR /&gt;&lt;BR /&gt;endlayout;&lt;/P&gt;&lt;P&gt;sidebar / align=bottom;&lt;BR /&gt;entry halign=center "&amp;amp;trt1 | &amp;amp;trt2 " /opaque=true border=true borderattrs=(color=black) backgroundcolor=lightgrey textattrs=(COLOR=black size=8 ) ;&lt;BR /&gt;endsidebar;&lt;/P&gt;&lt;P&gt;sidebar / align=bottom;&lt;BR /&gt;discretelegend "lgnd1" /valign=bottom location=outside down=1 sortorder=ASCENDINGFORMATTED title='PGI-S response categories:' ;&lt;BR /&gt;endsidebar;&lt;/P&gt;&lt;P&gt;endlayout;&lt;/P&gt;&lt;P&gt;endgraph;&lt;BR /&gt;end;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;proc sgrender data=g100 template=bar100 ;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;At present both left panel and the right panel has the colours on grey scale. How do I Keep the left panel colors as it is and the right panel colors on stack varies from white to red?&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;</description>
      <pubDate>Wed, 21 Oct 2020 18:10:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/stacked-bar-chart-with-groups-having-different-color-scales/m-p/693270#M20587</guid>
      <dc:creator>Manj</dc:creator>
      <dc:date>2020-10-21T18:10:51Z</dc:date>
    </item>
    <item>
      <title>Re: stacked bar chart with groups having different color scales</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/stacked-bar-chart-with-groups-having-different-color-scales/m-p/693527#M20588</link>
      <description>&lt;P&gt;Since you want different group colors in the right cell, then the group values for those segments have to be different.&amp;nbsp; Else, any legend will be wrong.&amp;nbsp; So, assign the groups in the right cell different values from the left cell (so now you have 10 group levels), and assign the different colors for them in the DATACOLORS option.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Oct 2020 14:55:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/stacked-bar-chart-with-groups-having-different-color-scales/m-p/693527#M20588</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2020-10-22T14:55:07Z</dc:date>
    </item>
  </channel>
</rss>

