Hello,
I am currently trying to get a nice display of my donut in a pdf.
I tried a lot of differents codes but i can not get what i want.
May be could you help me please ?
My dataset used for my reporting is DONUT.
Here is my code:
You could try PROC SGPIE instead.
data have;
infile cards expandtabs truncover;
input DRS_LIB_TYP_ASS &$40. N0 PCTN0 typ_ass &$40.;
cards;
Assuré principal 2040 0.588 Assuré principal (2040)
Conjoint 297 0.086 Conjoint (297)
Enfant 1133 0.327 Enfant (1133)
;
data have2;
set have;
do i=1 to N0;
output;
end;
run;
ods pdf file='c:\temp\temp.pdf' style=htmlblue;
option nonumber nodate;
title 'Effect Base 2021';
proc sgpie data=have2;
donut typ_ass/datalabeldisplay=(response percent)
datalabelloc=inside datalabelattrs=(color=white weight=bold);
keylegend /title='';
run;
ods pdf close;
Thanks you for your answer but unfortunately, i have the following error:
ERROR: Procedure SGPIE not found.
Which version of SAS are you running? Proc SGPIE was pre-production in 9.4.6 and production for 9.4.7 which would mean you are running 9.4.5 or earlier.
You can check by running:
Proc setinit; run;
In the log you would see something like this in the output:
Original site validation data Current version: 9.04.01M7P080520
The M7 means that I am currently rung 9.4.7 .
This means that you may want to update your install. That should be covered by any license.
Emm. Since you don't have PROC SGPIE license, then @GraphGuy (a.k.a Robert.Allison) may give you a help.
My display is now quite nice with the proc gchart
I will keep my job 😉
Thanks a lot for your help 🙂
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.