Produce a stacked bar chart by frequency of a variable that lists the decrease or increase of each group from the previous bar.
I have done this with a regular bar chart by overlaying a bubbleplot in Proc Template with transparent bubbles that labels the data point with my increase/decrease variable value; this is displayed in the "Bar Chart" image attached. Now, I need to do the same thing, only for a stacked bar chart, which is proving difficult. I have attached a second image, "Stacked Bar Chart," where I have manually added the values to illustrate what I am trying to accomplish.
Does anybody have an idea of how I would approach this?
This can be tricky as the (stacked) group bar chart is summarizing the data, and you don't know where to place the labels. One way would be to summarize the data yourself and precompute the low and high (and middle) of each bar segment in your data step. Put the delta values in another column. Then, use the HIGHLOW plot to draw the bars and use an overlaid scatter with MarkerChar to draw the delta values in the middle location.
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.