BookmarkSubscribeRSS Feed
A_B_C
Calcite | Level 5

Please find the attached file for reference. I am able to create the sub group bar chart but struggling in connecting bars using lines. Any Help would be greatly appreciated.


bar graph.PNG
3 REPLIES 3
GraphGuy
Meteorite | Level 14

Which proc are you using?  Gchart, Gbarline, or one of the new SG procedures? (or other?)

And are you writing code, or using the EG interface?

A_B_C
Calcite | Level 5

Thank You so much for your quick response.

At present I am using proc gchart  and yes I am writing code.

Please help if you have a solution for it.

Thanks Again.


GraphGuy
Meteorite | Level 14

Here's a basic example that demonstrates how to annotate a line onto a stacked gchart bar chart:

http://robslink.com/SAS/democd31/shoebar.htm

http://robslink.com/SAS/democd31/shoebar_info.htm

But one 'tricky' part will be that gchart will be summing up the bar segments for you and stacking them at the appropriate y-location, whereas in the annotate you'll need to calculate the summed/stacked y-coordinate yourself.

Perhaps it might be better to take a different approach - perhaps leave out the connecting lines, and let the bars touch, as in the following example:

http://robslink.com/SAS/democd60/healthcare.htm

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
  • 3 replies
  • 910 views
  • 0 likes
  • 2 in conversation