This documentation is what I was following that said I could go either with the DATTRS option or the DISCRETEATTRVAR option: GTL reference
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.
I removed my LEGENDITEM statements as well just in case there was something there. I didn't see any other statements with a NAME assignment option either, so I'm pretty lost on what's causing this.
My dataset is just coordinates and an ID column basically for plotting. My GTL code is:
proc template;
%if &nby=1 or %qupcase(&by_method)=PANELS %then %do;
define statgraph _sunburst;
begingraph /
designheight=&GraphHeight.in designwidth=&GraphWidth.in
backgroundcolor=&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&i;
%let fillcolor&i=%scan(%superq(colors),&i,%str( ));
legenditem type=fill name="grp&i" / label="%scan(%superq(_group_lvls),&i,|,m)"
fillattrs=(%if %sysevalf(%superq(fillcolor&i)^=,boolean) %then %do;
color=&&fillcolor&i
%end;
%else %if %sysfunc(mod(&i,12))=0 %then %do;
color=graphdata12:color
%end;
%else %do;
color=graphdata%sysevalf(%sysfunc(mod(&i,12))):color
%end;);
%end;
/* discreteattrmap name="attrs" / ignorecase=false;
%do i = 1 %to %sysfunc(countw(%superq(_group_lvls),|));
value "&i" /
fillattrs=(%if %sysevalf(%superq(fillcolor&i)^=,boolean) %then %do;
color=&&fillcolor&i
%end;
%else %if %sysfunc(mod(&i,12))=0 %then %do;
color=graphdata12:color
%end;
%else %do;
color=graphdata%sysevalf(%sysfunc(mod(&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=&rows columns=&columns order=columnmajor opaque=false columngutter=5 rowgutter=5;
sidebar / align=&Legend_Location ;
discretelegend
%do i = 1 %to %sysfunc(countw(%superq(_group_lvls),|));
"grp&i"
%end; / title="&group_label" border=false location=outside autoalign=(bottom) opaque=false
valueattrs=(size=&legend_font_size color=&font_color /*family="&font_family"*/)
titleattrs=(size=&legend_font_size color=&font_color /*family="&font_family"*/) exclude=('')
%if %qupcase(&Legend_Location)=RIGHT %then %do; across=1 %end;;
endsidebar;
*entry ' ';
%do b = 1 %to &nby;
%if %sysevalf(%superq(by)^=,boolean) %then %do;
cell;
cellheader;
entry halign=center "%scan(%superq(_by_lvls),&b,|,m)" / valign=bottom
textattrs=(size=&by_font_size color=&font_color weight=&by_font_weight/*family="&font_family"*/);
endcellheader;
%end;
layout overlay / border=false opaque=false walldisplay=none aspectratio=1
xaxisopts=(type=linear display=none
linearopts=(viewmin=&x_viewmin viewmax=&x_viewmax
tickvaluefitpolicy=none) offsetmin=0.03 offsetmax=0.03)
yaxisopts=(type=linear display=none
linearopts=(viewmin=&&y_viewmin&b viewmax=&&y_viewmax&b
minorticks=true minorgrid=true minorgridattrs=(pattern=1 color=greyef))
reverse=false);
/**sunburst Polygons**/
polygonplot x=eval(ifn(_bylvl_=&b,x,.)) y=y id=r_id / display=(fill ) group=group_lvl;
%if &box_outline=1 %then %do;
seriesplot x=eval(ifn(_bylvl_=&b and ^missing(r_id),x,.)) y=y /group=r_id
lineattrs=(%if %sysevalf(%qupcase(&box_outline_color)^=GROUP,boolean) %then %do; color=&box_outline_color %end;
pattern=solid
thickness=&box_outline_size) ;
%end;
/**Text Plot**/
%if &box_show_counts=1 %then %do;
textplot x=eval(ifn(_bylvl_=&b,x_text,.)) y=y_text text=value / position=center splitjustify=center strip=true
%if &rotate_text=1 %then %do; rotate=rotate %end;
textattrs=(size=&count_font_size color=&font_color weight=&count_font_weight /*family="&font_family"*/);
%end;
endlayout;
%if %sysevalf(%superq(by)^=,boolean) %then %do;
endcell;
%end;
%end;
endlayout;
endgraph;
end;
%end;
... View more