<?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: Getting correct colors in ODS output using attrid mapping in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Getting-correct-colors-in-ODS-output-using-attrid-mapping/m-p/428980#M20194</link>
    <description>&lt;P&gt;Look up,the ATTRPRIORITY option9n the ODS GRAPHICS statement or on here.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 19 Jan 2018 00:05:44 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2018-01-19T00:05:44Z</dc:date>
    <item>
      <title>Getting correct colors in ODS output using attrid mapping</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Getting-correct-colors-in-ODS-output-using-attrid-mapping/m-p/428976#M20193</link>
      <description>&lt;P&gt;Hello all-&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So I am trying to output an excel ODS document using SGPLOT and a scatter plot-&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Got the code below to work except for the fact that the colors do not render as requested-in that I am specifying two colors-&lt;/P&gt;
&lt;P&gt;green and tan- In the windowing environment it does not render correctly at all-it comes out blue and red. However in that environment I am less concerned.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When it actually outputs to excel-I get the green but not the tan-&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am using the&amp;nbsp;sashelp.cars dataset as an example-&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any assistance appreciated. Thank you&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Lawrence&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
    create table cars as select distinct make, sum(MSRP) as MSRP, 10 as line, case 
        when make in ('BMW', 'Dodge', 'Jaguar') then 1 else 0 end as pref from 
        sashelp.cars Where substr(make, 1, 1) in ('A', 'B', 'D', 'J', 'M') group by 
        make;
quit;

proc sql;
    create table attrmap as select distinct make as value, case when pref=1 then 
        '#c9df8a' else 'tan' end as markercolor, 'MYID' as ID from cars;
quit;

ods excel file="C:\temp\car.xlsx" style=Seaside options(sheet_name="Example" 
    SHEET_INTERVAL='PAGE' autofilter='NO' FROZEN_ROWHEADERS='no' 
    embedded_titles='yes' embedded_footnotes='yes' embed_titles_once='on' 
    embedded_titles='on' gridlines='off' START_AT='3,3');
title1 ls=1.5 "xxxx ^*";
ods graphics / reset width=10in height=6in;

proc sgplot data=cars dattrmap=attrmap;
    styleattrs DATACONTRASTCOLORS=(black);
    scatter x=make y=line /group=pref attrid=myid markerattrs=(size=40 
        symbol=circlefilled) filledoutlinedmarkers markeroutlineattrs=(thickness=0) 
        dataskin=pressed datalabel=MSRP SPLITCHAR="\" datalabelpos=center;
    keylegend / location=outside position=right title=' ' sortorder=descending;
    YAXIS LABEL="CAR MSRP SUM";
    XAXIS LABEL=" ";
run;

ods _all_ close;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 21 Jan 2018 20:15:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Getting-correct-colors-in-ODS-output-using-attrid-mapping/m-p/428976#M20193</guid>
      <dc:creator>LB</dc:creator>
      <dc:date>2018-01-21T20:15:39Z</dc:date>
    </item>
    <item>
      <title>Re: Getting correct colors in ODS output using attrid mapping</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Getting-correct-colors-in-ODS-output-using-attrid-mapping/m-p/428980#M20194</link>
      <description>&lt;P&gt;Look up,the ATTRPRIORITY option9n the ODS GRAPHICS statement or on here.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jan 2018 00:05:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Getting-correct-colors-in-ODS-output-using-attrid-mapping/m-p/428980#M20194</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-01-19T00:05:44Z</dc:date>
    </item>
    <item>
      <title>Re: Getting correct colors in ODS output using attrid mapping</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Getting-correct-colors-in-ODS-output-using-attrid-mapping/m-p/429202#M20201</link>
      <description>&lt;P&gt;That I did and tried both variants&amp;nbsp; &amp;nbsp;in both the ODs graphics reset and&amp;nbsp; style template changes to no avail.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hmm..&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Lawrence&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jan 2018 17:26:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Getting-correct-colors-in-ODS-output-using-attrid-mapping/m-p/429202#M20201</guid>
      <dc:creator>LB</dc:creator>
      <dc:date>2018-01-19T17:26:31Z</dc:date>
    </item>
    <item>
      <title>Re: Getting correct colors in ODS output using attrid mapping</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Getting-correct-colors-in-ODS-output-using-attrid-mapping/m-p/429290#M20205</link>
      <description>&lt;P&gt;Programming errors...&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Getting closer-&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Lawrence&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jan 2018 21:36:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Getting-correct-colors-in-ODS-output-using-attrid-mapping/m-p/429290#M20205</guid>
      <dc:creator>LB</dc:creator>
      <dc:date>2018-01-19T21:36:00Z</dc:date>
    </item>
    <item>
      <title>Re: Getting correct colors in ODS output using attrid mapping</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Getting-correct-colors-in-ODS-output-using-attrid-mapping/m-p/429491#M20210</link>
      <description>&lt;P&gt;I think it should be fillcolor not marker colour and to specify colours usually its CX then the hex code, if that's what you're trying to use.&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
    create table attrmap as select distinct make as value, case when pref=1 then 
        'CXc9df8a' else 'tan' end as fillcolor, 'MYID' as ID from cars;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Not sure if this will help. Note that I formatted the code in the first post.&lt;/P&gt;</description>
      <pubDate>Sun, 21 Jan 2018 20:31:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Getting-correct-colors-in-ODS-output-using-attrid-mapping/m-p/429491#M20210</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-01-21T20:31:57Z</dc:date>
    </item>
    <item>
      <title>Re: Getting correct colors in ODS output using attrid mapping</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Getting-correct-colors-in-ODS-output-using-attrid-mapping/m-p/429746#M20213</link>
      <description>&lt;P&gt;The main error I had made was that I had missed declaring the class variable as 'value'. Once&amp;nbsp;I had did that, it seem to work much better!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jan 2018 19:06:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Getting-correct-colors-in-ODS-output-using-attrid-mapping/m-p/429746#M20213</guid>
      <dc:creator>LB</dc:creator>
      <dc:date>2018-01-22T19:06:22Z</dc:date>
    </item>
  </channel>
</rss>

