How to create a pie to bar graph using below data.
| L1 - | 23 |
| L2 - | 124 |
| L3 | 33 |
| L4 | 7 |
| L5 | 5 |
| test1 | 5 |
| test2 | 5 |
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;
I am looking for exact pie to bar graph as below.
.
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:
Hope this helps!
Dan
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
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.