Assume I have a table with the following column headings: Year, Value 1, Value 2, and Group. I need a Grouped/Vertical Stacked bar chart which shows 2 bars: year (1994, 1995) for 2 Groups (0,1) and in these bars Value 1 builds the upper limit of the bar (e.g. year 1994; Value1 = 10) and Value2 should be a fration of this bar (e.g Value2 = 5 which is half of Value1 = 10). What do I click where in the Task Roles? Column to chart= Year, Group bars by = ???, Stack = Value2, Sum of = Value1, group charts by = Group. CHEERS!
Then EG and SAS/Graph will give you the output you want. Note, that if Value 1 is the total height of the bar, then you have to subtract
Value 2 from Value 1 in the transformed data because SAS/Graph will want to sum on
the variable for your "sum of". In this way, SAS/Graph takes care of the bar height
for you. At any rate, the correct click path would be (assumes you have already created the transformed data table):
Start new project to transform data OR
Add transformed data to project
Highlight transformed data table in project
Graph --> Bar Chart --> Grouped/Stacked Vertical Bar
Task Roles --> Column to Chart = Year
Task Roles --> Group bars by = Grp
Task Roles --> Stack = Type
Task Roles --> Sum of = Num
Appearance --> Bars --> click on the box "Specify number of bars" and then make sure that the top radio button is checked (One bar for each unique data value).
Then select --> RUN to create the graph
The issue with the data as you describe it, is that you have 2 numeric variables, Value1 and Value2 but, SAS/Graph only allows you to have 1 numeric variable for the "sum of" role. This means that you need a "Type" variable which is set to either value1 or value2 and then you need only 1 numeric variable, but the combination of Year, Grp and Type make sure that SAS/Graph uses the value for the right piece of the bar chart.
If you contact Tech Support, they can help you figure out how to transpose your data to be in the right form for SAS/Graph. You could either use PROC TRANSPOSE or you could use a DATA STEP program. Since you may need to subtract Value2 from Value1 in order to adjust Value1, that points to a DATA STEP program (which you would put into a CODE NODE in EG). Of course, if you have entered the data points into EG by typing them, then you could just readjust your input. Tech Support is really your best bet to help you with data manipulation issues in EG (or anywhere else, for that matter).