- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi all, Appreciate your advice on this. I want to display my percentages rounded to a whole number. Is there a possibility to do that in the proc spgpie step.Below is my code:
proc sgpie data=ab noautolegend
dattrmap=attrmap;
pie var1 /
datalabelloc=inside datalabeldisplay=(response percent ) datalabelattrs=(size=25 family='Calibri' weight=bold)
startangle=90 attrid=myid ;
by ID;
run;
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
The only way to do this currently is to NOT show the pie percentage label, but instead send the percentages to the pie via the RESPONSE column and use the STATFMT option to set a PERCENT format with no decimal places.
Hope this helps!
Dan
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Moved your post to Graphics Programming board !
Is this post of any help to you?
holevalue of sgpie format
https://communities.sas.com/t5/SAS-Enterprise-Guide/holevalue-of-sgpie-format/m-p/770252#M39597
Koen
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
The only way to do this currently is to NOT show the pie percentage label, but instead send the percentages to the pie via the RESPONSE column and use the STATFMT option to set a PERCENT format with no decimal places.
Hope this helps!
Dan
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Thank you, Dan! Does this mean we have to calculate the percentages in a prior step before the pie chart?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Yes, you would need to precompute each slice as a percent of total to use this approach.