BookmarkSubscribeRSS Feed
radha009
Quartz | Level 8

How to create a pie to bar graph using below data.

 

L1 - 23
L2 - 124
L333
L47
L55
test15
test25
4 REPLIES 4
SuryaKiran
Meteorite | Level 14

Hi,

 

Here is the simple syntax for bar chart. There are many options your can use to customize your graph.

data have;
infile datalines ;
input name :$ var;
datalines;
L1 23
L2 124
L3 33
L4 7
L5 5
test1 5
test2 5
;
run;

PROC GCHART DATA=WORK.have;
VBAR name/ SUMVAR=var;
run;
Thanks,
Suryakiran
radha009
Quartz | Level 8

I am looking for exact pie to bar graph as below.

.pb.jpg

DanH_sas
SAS Super FREQ

PROC GCHART has this concept of a "detail" pie that can convey similar information to your examples. Check out this example and see what you think:

 

http://support.sas.com/documentation/cdl/en/graphref/65389/HTML/default/viewer.htm#p0rykxji060wvzn1x...

 

Hope this helps!

Dan

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

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

View all other training opportunities.

Discussion stats
  • 4 replies
  • 813 views
  • 0 likes
  • 4 in conversation