<?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: SGRENDER Error: Name is not Unique! when using DATTRMAP option in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/SGRENDER-Error-Name-is-not-Unique-when-using-DATTRMAP-option/m-p/907105#M24244</link>
    <description>&lt;P&gt;Too add more information it seems when I remove the TEXTPLOT from my GTL code the error goes away, so there is some kind of interaction going on there that I'm not seeing.&amp;nbsp; I don't even have a group variable in my TEXTPLOT.&lt;/P&gt;</description>
    <pubDate>Fri, 08 Dec 2023 19:13:11 GMT</pubDate>
    <dc:creator>JeffMeyers</dc:creator>
    <dc:date>2023-12-08T19:13:11Z</dc:date>
    <item>
      <title>SGRENDER Error: Name is not Unique! when using DATTRMAP option</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGRENDER-Error-Name-is-not-Unique-when-using-DATTRMAP-option/m-p/907033#M24239</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; I have a very complicated figure that I'm trying to add a data attribute map to.&amp;nbsp; It works fine when adding it into GTL template code directly, but when making a data attribute map dataset and assigning it in the SGRENDER statement I get the following error:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JeffMeyers_0-1702054975277.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/91052i864B8F84BAA00C0F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JeffMeyers_0-1702054975277.png" alt="JeffMeyers_0-1702054975277.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;There is only one attribute ID in the map and I can't figure out what the issue is.&amp;nbsp; I can assign this data attribute map to SGPLOT but the error happens in SGRENDER.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JeffMeyers_1-1702055037694.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/91053iB4DB598051DEC7C3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JeffMeyers_1-1702055037694.png" alt="JeffMeyers_1-1702055037694.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Any ideas what would cause this error?&amp;nbsp; I can't find documentation on it.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Dec 2023 17:04:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGRENDER-Error-Name-is-not-Unique-when-using-DATTRMAP-option/m-p/907033#M24239</guid>
      <dc:creator>JeffMeyers</dc:creator>
      <dc:date>2023-12-08T17:04:25Z</dc:date>
    </item>
    <item>
      <title>Re: SGRENDER Error: Name is not Unique! when using DATTRMAP option</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGRENDER-Error-Name-is-not-Unique-when-using-DATTRMAP-option/m-p/907064#M24240</link>
      <description>&lt;P&gt;You're missing the DATTRVAR statement on the SGRENDER procedure. You have to use that to bind the attribute map to the correct variable. For example, if you were plotting SASHELP.CLASS with a group variable of SEX, using an attributes map with an ID of "MYID", the SGRENDER would look something like the following:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc sgrender data=sashelp.class template=mytemplate dattrmap=attrmap;&lt;/P&gt;
&lt;P&gt;dattrvar sex="MYID";&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Let me know if that works for you. Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 21 Dec 2023 15:22:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGRENDER-Error-Name-is-not-Unique-when-using-DATTRMAP-option/m-p/907064#M24240</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2023-12-21T15:22:12Z</dc:date>
    </item>
    <item>
      <title>Re: SGRENDER Error: Name is not Unique! when using DATTRMAP option</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGRENDER-Error-Name-is-not-Unique-when-using-DATTRMAP-option/m-p/907080#M24241</link>
      <description>I thought I could just use the DISCRETEATTRVAR statement in my GTL code:&lt;BR /&gt; discreteattrvar attrvar=_attrs_ var=group_lvl attrmap="attrs" ;  &lt;BR /&gt;I'll give this a try</description>
      <pubDate>Fri, 08 Dec 2023 18:02:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGRENDER-Error-Name-is-not-Unique-when-using-DATTRMAP-option/m-p/907080#M24241</guid>
      <dc:creator>JeffMeyers</dc:creator>
      <dc:date>2023-12-08T18:02:13Z</dc:date>
    </item>
    <item>
      <title>Re: SGRENDER Error: Name is not Unique! when using DATTRMAP option</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGRENDER-Error-Name-is-not-Unique-when-using-DATTRMAP-option/m-p/907082#M24242</link>
      <description>&lt;P&gt;No, the idea was that you can use the attrmap dataset with any GTL template without modifying the template. Your GTL template should have no discrete attribute map syntax. The gives you the ability to use your template with or without the attributes map.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Dec 2023 18:07:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGRENDER-Error-Name-is-not-Unique-when-using-DATTRMAP-option/m-p/907082#M24242</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2023-12-08T18:07:43Z</dc:date>
    </item>
    <item>
      <title>Re: SGRENDER Error: Name is not Unique! when using DATTRMAP option</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGRENDER-Error-Name-is-not-Unique-when-using-DATTRMAP-option/m-p/907090#M24243</link>
      <description>&lt;P&gt;This documentation is what I was following that said I could go either with the DATTRS option or the DISCRETEATTRVAR option:&amp;nbsp;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/grstatug/p0wv2bbjftizkpn1puokmcblrw15.htm" target="_self"&gt;GTL reference&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Either way, I removed the attribute map references from my GTL code and tried with the DATTRVAR instead and it resulted in the same error.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JeffMeyers_0-1702059411645.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/91080iC5BACF9653035494/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JeffMeyers_0-1702059411645.png" alt="JeffMeyers_0-1702059411645.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I removed my LEGENDITEM statements as well just in case there was something there.&amp;nbsp; I didn't see any other statements with a NAME assignment option either, so I'm pretty lost on what's causing this.&lt;/P&gt;
&lt;P&gt;My dataset is just coordinates and an ID column basically for plotting.&amp;nbsp; My GTL code is:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc template;
        %if &amp;amp;nby=1 or %qupcase(&amp;amp;by_method)=PANELS %then %do;
            define statgraph _sunburst;
            begingraph / 
                    designheight=&amp;amp;GraphHeight.in designwidth=&amp;amp;GraphWidth.in    
                    backgroundcolor=&amp;amp;bg_color   
                    /**Turns the border around the plot off if border=0**/
                    %if %superq(border)=0 %then %do;
                        border=false 
                    %end; 
                    subpixel=on;

                /*%do i = 1 %to %sysfunc(countw(%superq(_group_lvls),|));
                    %local fillcolor&amp;amp;i;
                    %let fillcolor&amp;amp;i=%scan(%superq(colors),&amp;amp;i,%str( ));
                    legenditem type=fill name="grp&amp;amp;i" / label="%scan(%superq(_group_lvls),&amp;amp;i,|,m)"
                        fillattrs=(%if %sysevalf(%superq(fillcolor&amp;amp;i)^=,boolean) %then %do;
                                        color=&amp;amp;&amp;amp;fillcolor&amp;amp;i
                                    %end;
                                    %else %if %sysfunc(mod(&amp;amp;i,12))=0 %then %do; 
                                        color=graphdata12:color 
                                    %end;
                                    %else %do; 
                                        color=graphdata%sysevalf(%sysfunc(mod(&amp;amp;i,12))):color 
                                    %end;);
                %end;
               /* discreteattrmap name="attrs" / ignorecase=false;  
                    %do i = 1 %to %sysfunc(countw(%superq(_group_lvls),|));                    
                        value "&amp;amp;i" /
                            fillattrs=(%if %sysevalf(%superq(fillcolor&amp;amp;i)^=,boolean) %then %do;
                                        color=&amp;amp;&amp;amp;fillcolor&amp;amp;i
                                    %end;
                                    %else %if %sysfunc(mod(&amp;amp;i,12))=0 %then %do; 
                                        color=graphdata12:color 
                                    %end;
                                    %else %do; 
                                        color=graphdata%sysevalf(%sysfunc(mod(&amp;amp;i,12))):color 
                                    %end;);
                    %end;
                enddiscreteattrmap;
/*                discreteattrvar attrvar=_attrs_ var=group_lvl attrmap="attrs" ;*/
/*                discreteattrvar attrvar=_attrs_ var=group_lvl attrmap="attrs" ;  */
                layout lattice / rows=&amp;amp;rows columns=&amp;amp;columns order=columnmajor opaque=false columngutter=5 rowgutter=5;
                    sidebar / align=&amp;amp;Legend_Location ;
                        discretelegend 
                            %do i = 1 %to %sysfunc(countw(%superq(_group_lvls),|)); 
                                "grp&amp;amp;i" 
                            %end; / title="&amp;amp;group_label" border=false location=outside autoalign=(bottom) opaque=false
                            valueattrs=(size=&amp;amp;legend_font_size color=&amp;amp;font_color /*family="&amp;amp;font_family"*/) 
                            titleattrs=(size=&amp;amp;legend_font_size color=&amp;amp;font_color /*family="&amp;amp;font_family"*/) exclude=('')
                            %if %qupcase(&amp;amp;Legend_Location)=RIGHT %then %do; across=1 %end;;
                    endsidebar;
                    *entry ' ';
                    %do b = 1 %to &amp;amp;nby;
                        %if %sysevalf(%superq(by)^=,boolean) %then %do;
                            cell;
                            cellheader;
                                 entry halign=center "%scan(%superq(_by_lvls),&amp;amp;b,|,m)" / valign=bottom
                                    textattrs=(size=&amp;amp;by_font_size color=&amp;amp;font_color weight=&amp;amp;by_font_weight/*family="&amp;amp;font_family"*/);
                            endcellheader;
                        %end;
                        layout overlay / border=false opaque=false walldisplay=none aspectratio=1
                            xaxisopts=(type=linear display=none
                            linearopts=(viewmin=&amp;amp;x_viewmin viewmax=&amp;amp;x_viewmax 
                                         tickvaluefitpolicy=none)   offsetmin=0.03 offsetmax=0.03)
                            yaxisopts=(type=linear display=none
                                linearopts=(viewmin=&amp;amp;&amp;amp;y_viewmin&amp;amp;b viewmax=&amp;amp;&amp;amp;y_viewmax&amp;amp;b
                                                minorticks=true minorgrid=true minorgridattrs=(pattern=1 color=greyef)) 
                                reverse=false);
                            /**sunburst Polygons**/
                            polygonplot x=eval(ifn(_bylvl_=&amp;amp;b,x,.)) y=y id=r_id / display=(fill ) group=group_lvl;
                                %if &amp;amp;box_outline=1 %then %do;
                                    seriesplot x=eval(ifn(_bylvl_=&amp;amp;b and ^missing(r_id),x,.)) y=y /group=r_id 
                                        lineattrs=(%if %sysevalf(%qupcase(&amp;amp;box_outline_color)^=GROUP,boolean) %then %do; color=&amp;amp;box_outline_color %end; 
                                                    pattern=solid
                                                    thickness=&amp;amp;box_outline_size) ;
                                %end;
                            /**Text Plot**/
                            %if &amp;amp;box_show_counts=1 %then %do;
                                textplot x=eval(ifn(_bylvl_=&amp;amp;b,x_text,.)) y=y_text text=value /  position=center splitjustify=center strip=true 
                                    %if &amp;amp;rotate_text=1 %then %do; rotate=rotate %end;
                                    textattrs=(size=&amp;amp;count_font_size color=&amp;amp;font_color weight=&amp;amp;count_font_weight /*family="&amp;amp;font_family"*/);
                            %end;
                        endlayout;
                        %if %sysevalf(%superq(by)^=,boolean) %then %do;
                            endcell;
                        %end;
                    %end;        
                endlayout;
            endgraph;
            end;
       %end;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 08 Dec 2023 18:20:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGRENDER-Error-Name-is-not-Unique-when-using-DATTRMAP-option/m-p/907090#M24243</guid>
      <dc:creator>JeffMeyers</dc:creator>
      <dc:date>2023-12-08T18:20:14Z</dc:date>
    </item>
    <item>
      <title>Re: SGRENDER Error: Name is not Unique! when using DATTRMAP option</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGRENDER-Error-Name-is-not-Unique-when-using-DATTRMAP-option/m-p/907105#M24244</link>
      <description>&lt;P&gt;Too add more information it seems when I remove the TEXTPLOT from my GTL code the error goes away, so there is some kind of interaction going on there that I'm not seeing.&amp;nbsp; I don't even have a group variable in my TEXTPLOT.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Dec 2023 19:13:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGRENDER-Error-Name-is-not-Unique-when-using-DATTRMAP-option/m-p/907105#M24244</guid>
      <dc:creator>JeffMeyers</dc:creator>
      <dc:date>2023-12-08T19:13:11Z</dc:date>
    </item>
    <item>
      <title>Re: SGRENDER Error: Name is not Unique! when using DATTRMAP option</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGRENDER-Error-Name-is-not-Unique-when-using-DATTRMAP-option/m-p/907106#M24245</link>
      <description>&lt;P&gt;It seems that the issue is caused by referring to a variable named VALUE in my dataset within the template.&amp;nbsp; When I changed this variable name the error went away.&amp;nbsp; I'm assuming this is related to VALUE being a required column in the attribute map dataset.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Dec 2023 19:16:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGRENDER-Error-Name-is-not-Unique-when-using-DATTRMAP-option/m-p/907106#M24245</guid>
      <dc:creator>JeffMeyers</dc:creator>
      <dc:date>2023-12-08T19:16:01Z</dc:date>
    </item>
  </channel>
</rss>

