BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Anita_n
Pyrite | Level 9

Hello all,

is there any option to add to this code, so that small values are not summarised as other in my pie chart?

legend1 label=none
        shape=bar(4,1.5)
        position=(top left)
        offset=(5,)
        across=1
        mode=share;

proc gchart data=mydat;
    pie var1 / sumvar=cases
	            noheading
                     coutline=black
				value= inside
				slice=arrow
				percent=outside
				legend=legend1;
			
run;
quit;
1 ACCEPTED SOLUTION
5 REPLIES 5
PaigeMiller
Diamond | Level 26

Small values of variable CASES? Small pie slices? What is your definition of "small"?

--
Paige Miller
Anita_n
Pyrite | Level 9

@PaigeMiller Hi, I mean both situation, because small values of variable cases automatically draws small pie slices

PaigeMiller
Diamond | Level 26

You would have to filter the data before you create the PIE chart, so that PROC GCHART is not working on the full data set, but it is working on a data set where you have removed the small values and/or small slices.

--
Paige Miller
GraphGuy
Meteorite | Level 14

Do you want small values to not be shown at all? Or do you want small values to stay in their own slices, rather than being summarized into the automatically generated 'Other' slice? (there are 2 answers above in previous comments - one for each of these scenarios)

SAS INNOVATE 2024

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

Register now!

How to Concatenate Values

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.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 5 replies
  • 326 views
  • 2 likes
  • 4 in conversation