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

Custom Stacked bar (normalised to 100%) / Line Graph

Accepted Solution Solved
Reply
Contributor
Posts: 57
Accepted Solution

Custom Stacked bar (normalised to 100%) / Line Graph

Hi Forum,

 

I've had a couple of goes at creating this Stacked Bar (with 2 values) and Line combo graph but am having the following issues.

 

Attempt 1. I use the Customer graph builder & drag in a Bar graph & a Line Graph, 

Then I try to add another measure for the bar graph so I can add the second measure to the bar stack.

Issue - I can't change the Stack to normalise to 100%

 

Attempt 2. I drag 2 bar graphs into the design plus a Line graph,

Then I format the 2 bar graphs as I need & find that I can't use a stacked bar.

 

Can someone give me a step by step way to achieve this?

 

I've looked at the User Guide but m still stuck.

 

Thanks

 


Accepted Solutions
Solution
‎06-25-2017 08:17 PM
Contributor
Posts: 57

Re: Custom Stacked bar (normalised to 100%) / Line Graph

Thanks Bruno,

 

That worked perfectly!

 

Next step is to change the colours of the Stacked bar for the 2 categories I have.

 

In the design of the Custom graph, I have selected black as mthat is one of the colours needed,

 

My attempts to get the other colour (Red) haven't succeeded.

 

How can I select a part of the stack & apply a colour?

 

Thanks again!

 

Peter

View solution in original post


All Replies
SAS Super FREQ
Posts: 683

Re: Custom Stacked bar (normalised to 100%) / Line Graph

Bar charts support more than one measure by default. so there is no need to add another measure.

 

The grouping scale "normalize groups to 100%" can be set once you use your custom graph.

 

Should it look like this?

Snap11.png

Contributor
Posts: 57

Re: Custom Stacked bar (normalised to 100%) / Line Graph

Thanks Bruno, that's exactly what I'm after!

 

I found that if I used 1 Bar Graph & then added a Line I got the message like "Layering another chart would make the chart unable to normalise to 100%"

 

So, if I follow you, these are the steps you took.

 

1. Go to Custom Cart, right click & select edit custom graph

2. Add a Bar graph to the design area

3. Add a Line graph to the design area

4. Save the chart & use in the report builder as normal.

 

Is this correct & do I need to change any other settings?

 

Thanks for your help.

 

Peter

SAS Super FREQ
Posts: 683

Re: Custom Stacked bar (normalised to 100%) / Line Graph

Yes these are the steps

 

  1. create new custom graph
  2. add bar chart, set grouping style to stacked
  3. add line chart, set y axis to be on the right
  4. save
  5. use in the report, set grouping scale accordingly
Contributor
Posts: 57

Re: Custom Stacked bar (normalised to 100%) / Line Graph

Thanks Bruno,

 

I'll try this on Monday, so in 2 days time I'll come back tp you.

 

Appreciate your time.

 

Peter 

Solution
‎06-25-2017 08:17 PM
Contributor
Posts: 57

Re: Custom Stacked bar (normalised to 100%) / Line Graph

Thanks Bruno,

 

That worked perfectly!

 

Next step is to change the colours of the Stacked bar for the 2 categories I have.

 

In the design of the Custom graph, I have selected black as mthat is one of the colours needed,

 

My attempts to get the other colour (Red) haven't succeeded.

 

How can I select a part of the stack & apply a colour?

 

Thanks again!

 

Peter

Contributor
Posts: 57

Re: Custom Stacked bar (normalised to 100%) / Line Graph

Hi Forum, I have some more info about colouring the Columns and I found it was really a trial & error process to get the colours I wanted. Particularly for a stacked Column, I found I was changing some random settings, then changing the Data Colour under the Styles tab. Sometimes it worked but usually din't so I spent quite some time getting the colours I needed.
☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 6 replies
  • 305 views
  • 0 likes
  • 2 in conversation