Exploring, modeling, predicting and reporting with SAS Visual Analytics and SAS Visual Statistics

Bar Chart- Stacked+ General

Accepted Solution Solved
Reply
Contributor
Posts: 24
Accepted Solution

Bar Chart- Stacked+ General

Hi,

 

Is there a way to create a Stacked plus a general bar in SAS VA.

 

I have three capacities:

 

1. Budget Capacity

2. Available Capacity

3. Allocated Capacity

 

where, Budget Capacity= Allocated Capacity + Available Capacity

 

I wish to make a graph in which each category has two bars. One for budget capacity and the other stacked one for Allocated + Available.


Accepted Solutions
Solution
‎02-25-2016 06:05 PM
Occasional Contributor
Posts: 16

Re: Bar Chart- Stacked+ General

Hi SASEnthusiast,

 

You can create the graph you want with the Custom Graph Builder. You can put two bar charts on top of eachother and have them share the category (x-axis). Initially it looks like this:

 

1.PNG

 

Bar Chart 1 allows multiple data assignments by default, Bar Chart 2 doesn't. You can change this by editing the Role for Bar Chart 2 Measure if you like. For stacked charts you obviously need multiple assignments :-)

 

Now to show them next to eachother, play around with the properties. 

 

Under Plot Display, for bar chart 1 set the bar spacing to something like 65 and set the discrete offset to -20 negative. This makes a slimmer bar and pushes it to the left. Do the same for bar chart 2, but with a positive offset to push it to the right. You'll see that they are next to eachother.

 

Under Groups, set the grouping style to "Stack" for the bar chart you want to have stacked.

 

 

2.PNG 

 

Now save it and use it in the report. Assign the budget capacity as the measure for the unstacked chart, and the Available and Allocated as the measures for the stacked chart.

View solution in original post


All Replies
Regular Contributor
Posts: 196

Re: Bar Chart- Stacked+ General

[ Edited ]

Hello  SAS Enthusiast,

 

 

I have some stuff for you,

 

 

Exp.png

Hope this will help,

 

Let me know...

 

 

Thanks & Regards,

Teja Surapaneni

Contributor
Posts: 24

Re: Bar Chart- Stacked+ General

Hi Teja,

 

This is really what I need. Could you guide me towards the steps for this?

Also, can the aggregation (as in yours) be a predefined column and not a calculated column?

Solution
‎02-25-2016 06:05 PM
Occasional Contributor
Posts: 16

Re: Bar Chart- Stacked+ General

Hi SASEnthusiast,

 

You can create the graph you want with the Custom Graph Builder. You can put two bar charts on top of eachother and have them share the category (x-axis). Initially it looks like this:

 

1.PNG

 

Bar Chart 1 allows multiple data assignments by default, Bar Chart 2 doesn't. You can change this by editing the Role for Bar Chart 2 Measure if you like. For stacked charts you obviously need multiple assignments :-)

 

Now to show them next to eachother, play around with the properties. 

 

Under Plot Display, for bar chart 1 set the bar spacing to something like 65 and set the discrete offset to -20 negative. This makes a slimmer bar and pushes it to the left. Do the same for bar chart 2, but with a positive offset to push it to the right. You'll see that they are next to eachother.

 

Under Groups, set the grouping style to "Stack" for the bar chart you want to have stacked.

 

 

2.PNG 

 

Now save it and use it in the report. Assign the budget capacity as the measure for the unstacked chart, and the Available and Allocated as the measures for the stacked chart.

Contributor
Posts: 24

Re: Bar Chart- Stacked+ General

This works beautifully. Thank you so much.

Community Manager
Posts: 422

Re: Bar Chart- Stacked+ General

I'm glad you found some useful info, SASEnthusiast! Can you highlight the exact solution to your problem by "Accepting it as a solution"? And if one was particularly helpful, feel free to "Like" it. This will help other community members who may run into the same issue know what worked.

Thanks!
Anna

SAS Employee
Posts: 60

Re: Bar Chart- Stacked+ General

For more information about SAS Visual Analytics Graph Builder, see Creating and Using Custom Graph Objects in the SAS Visual Analytics 7.3 User's Guide.  (A similar chapter is available in the 7.2, 7.1, 6.4, and 6.3 user's guides.)

 

-Joy

Post a Question
Discussion Stats
  • 6 replies
  • 543 views
  • 3 likes
  • 5 in conversation