<?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: Legend for waterfall plot in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Legend-for-waterfall-plot/m-p/861340#M340249</link>
    <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt;&amp;nbsp;. I used legenditem and discretelegend and it worked.&lt;/P&gt;</description>
    <pubDate>Tue, 28 Feb 2023 11:43:14 GMT</pubDate>
    <dc:creator>Manj</dc:creator>
    <dc:date>2023-02-28T11:43:14Z</dc:date>
    <item>
      <title>Legend for waterfall plot</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Legend-for-waterfall-plot/m-p/861172#M340169</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp; I have made this following figure. Im quite unsure how to do the legend as one box for blue and one box for red .I get this colurs from colorresponse but my group variable is different. Can some one plz help?&lt;/P&gt;&lt;P&gt;My code below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&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="Manj_0-1677520548544.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/80906i03EB3EFC018597FD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Manj_0-1677520548544.png" alt="Manj_0-1677520548544.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;proc template;&lt;BR /&gt;define statgraph bw_profile;&lt;BR /&gt;dynamic title;&lt;BR /&gt;begingraph / designwidth=1100 designheight=640 border = off;&lt;BR /&gt;entrytitle "Figure 1" / textattrs=(color=black family="Courier New" size=9pt weight=normal);&lt;BR /&gt;entrytitle "xxxxxxxxxxx " / textattrs=(color=black family="Courier New" size=9pt weight=normal);&lt;BR /&gt;entrytitle "yyyyyyyyyyyyyyyyyyyyyyyyyyyyyy" / textattrs=(color=black family="Courier New" size=9pt weight=normal);&lt;BR /&gt;entryfootnote halign = left " " /textattrs=(size=8 ) ;&lt;BR /&gt;entryfootnote halign = left " " /textattrs=(size=8 ) ;&lt;BR /&gt;entryfootnote halign = left " " /textattrs=(size=8 ) ;&lt;BR /&gt;entryfootnote halign = left "MFSAF = Myelofibrosis Symptom Assessment Form (MFSAF) V4.0; OL = Open Label."/ textattrs=(color=black family="Courier New" size=9pt weight=normal);&lt;BR /&gt;entryfootnote halign = left "Program: f_xx_ab48_ir.sas" halign=right " Page 1 of 1" / textattrs=(color=black family="Courier New" size=9pt weight=normal) ;&lt;/P&gt;&lt;P&gt;layout lattice / rowdatarange=data columns=1 rows=2 rowweights = (.95 .05);&lt;/P&gt;&lt;P&gt;layout overlay / cycleattrs=true&lt;BR /&gt;yaxisopts = (label = 'Change from Baseline, %' offsetmin = 0.015 offsetmax = 0.015&lt;BR /&gt;linearopts = (tickvalueformat=ytfmt. viewmin =-100 viewmax = 100 tickvaluesequence=(start=-100 end=100 increment=10)))&lt;BR /&gt;xaxisopts = (display=none);&lt;BR /&gt;barchart category=id response=pchg / group=ESMMB groupdisplay=cluster colorresponse=resp colormodel=(blue red)&lt;BR /&gt;name='waterfall' /*dataskin=gloss filltype=gradient*/&lt;BR /&gt;barlabelattrs=(size=6pt weight=bold)&lt;BR /&gt;fillattrs=(color=gray)&lt;BR /&gt;outlineattrs=(color=gray)&lt;BR /&gt;clusterwidth=0.8;&lt;BR /&gt;referenceline y=-50/ lineattrs=(pattern=mediumdash) ;&lt;BR /&gt;referenceline x=&amp;amp;yref / lineattrs=(pattern=mediumdash);&lt;BR /&gt;endlayout;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;layout overlay / cycleattrs=true&lt;BR /&gt;xaxisopts = (display=none)&lt;BR /&gt;yaxisopts = (display=none) walldisplay = none;&lt;BR /&gt;seriesplot x=id y=myy/lineattrs=(thickness = 0);&lt;BR /&gt;drawtext "&amp;amp;danlbl (N= %left(&amp;amp;pop3))" /y=1 x=8 width=18 xspace=wallpercent;&lt;BR /&gt;drawtext "&amp;amp;mmblbl (N= %left(&amp;amp;pop2))" /y=1 x=45 width=18 xspace=wallpercent;&lt;BR /&gt;endlayout;&lt;BR /&gt;&lt;BR /&gt;endlayout;&lt;BR /&gt;endgraph;&lt;BR /&gt;end;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Feb 2023 18:06:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Legend-for-waterfall-plot/m-p/861172#M340169</guid>
      <dc:creator>Manj</dc:creator>
      <dc:date>2023-02-27T18:06:45Z</dc:date>
    </item>
    <item>
      <title>Re: Legend for waterfall plot</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Legend-for-waterfall-plot/m-p/861222#M340189</link>
      <description>&lt;P&gt;Without data or the values of some macro variables much less an Sgrender call I cannot test any code.&lt;/P&gt;
&lt;P&gt;I think that if you modify this:&lt;/P&gt;
&lt;PRE&gt;barchart category=id response=pchg / group=ESMMB groupdisplay=cluster colorresponse=resp colormodel=(blue red)
name='waterfall' /*dataskin=gloss filltype=gradient*/
barlabelattrs=(size=6pt weight=bold)
fillattrs=(color=gray)
outlineattrs=(color=gray)
clusterwidth=0.8;&lt;/PRE&gt;
&lt;P&gt;to add a Name that a Discretelegend statement can associate with your chart such as&lt;/P&gt;
&lt;PRE&gt;barchart category=id response=pchg / group=ESMMB groupdisplay=cluster colorresponse=resp colormodel=(blue red)
name='waterfall' /*dataskin=gloss filltype=gradient*/
barlabelattrs=(size=6pt weight=bold)
fillattrs=(color=gray)
outlineattrs=(color=gray)
clusterwidth=0.8
&lt;FONT color="#800080"&gt;&lt;STRONG&gt;name='bars'&lt;/STRONG&gt;&lt;/FONT&gt;;

discretelegend 'bars';&lt;/PRE&gt;
&lt;P&gt;That you will get a default legend. Add options to discretelegend as needed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note: it is a good idea to paste code into a text box opened on the forum with the &amp;lt;/&amp;gt; icon above the message window to preserver formatting.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Feb 2023 20:58:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Legend-for-waterfall-plot/m-p/861222#M340189</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2023-02-27T20:58:54Z</dc:date>
    </item>
    <item>
      <title>Re: Legend for waterfall plot</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Legend-for-waterfall-plot/m-p/861340#M340249</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt;&amp;nbsp;. I used legenditem and discretelegend and it worked.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Feb 2023 11:43:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Legend-for-waterfall-plot/m-p/861340#M340249</guid>
      <dc:creator>Manj</dc:creator>
      <dc:date>2023-02-28T11:43:14Z</dc:date>
    </item>
  </channel>
</rss>

