I don't use the graph template language, but I was able to use an attribute map data set with several SASHELP data sets.
As the log notes, SGPIE is pre-production for SAS 9.4M6. I tried to control the color for the "Other" slice when using AgeAtStart for the SASHELP.HEART data set, but couldn't get the syntax to work.
proc format;
value AgeGrp
1 - 29 ='Age < 30'
30 - 59 ='Age 30 - 59'
60 - 100 ='Age 60+'
;
run;
data attrmap;
length ID $ 8 FillColor $ 9 value $ 11;
infile datalines dlm='|';
input id $ fillcolor $ value $;
datalines;
myagegrp|green|Age < 30
myagegrp|red|Age 30 - 59
myagegrp|blue|Age 60+
;
run;
ods listing gpath='/folders/myfolders/ODS Graphics/SGPIE'
style=HTMLBlue;
ods graphics / noborder
imagename='SGPIE_example_'
reset=index(1);
proc sgpie data=sashelp.bmimen dattrmap=attrmap;
pie age / startangle=90 direction=clockwise attrid=myagegrp
datalabelattrs=(size=12) dataskin=matte;
format age AgeGrp. ;
title 'SASHELP.BMIMEN data set';
run;
proc sgpie data=sashelp.class dattrmap=attrmap;
pie age / startangle=90 direction=clockwise attrid=myagegrp
datalabelattrs=(size=12) dataskin=matte;
format age AgeGrp. ;
title 'SASHELP.CLASS data set';
run;
proc sgpie data=sashelp.heart dattrmap=attrmap;
pie AgeAtStart / startangle=90 direction=clockwise attrid=myagegrp
datalabelattrs=(size=12) dataskin=matte;
format AgeAtStart AgeGrp. ;
title 'SASHELP.HEART data set';
title2 'AgeAtStart';
run;
proc sgpie data=sashelp.heart dattrmap=attrmap;
pie AgeAtDeath / startangle=90 direction=clockwise attrid=myagegrp
datalabelattrs=(size=12) dataskin=matte;
format AgeAtDeath AgeGrp. ;
title 'SASHELP.HEART data set';
title2 'AgeAtDeath';
run;
proc sgpie data=sashelp.heart dattrmap=attrmap;
pie AgeCHDdiag / startangle=90 direction=clockwise attrid=myagegrp
datalabelattrs=(size=12) dataskin=matte;
format AgeCHDdiag AgeGrp. ;
title 'SASHELP.HEART data set';
title2 'AgeCHDdiag';
run;
These are the pie charts:
Pie chart of age in SASHELP.BMIMEN Pie chart of age in SASHELP.CLASS Pie chart of AgeAtStart in SASHELP.HEART Pie chart of AgeAtDeath in SASHELP.HEART Pie chart of AgeCHDdiag in SASHELP.HEART
... View more