I am trying to create a chart with 2 sets of data being displayed. I have created the 2 charts separately. One is a interleave vertical bar chart and the other a simple line plot. I have managed to compile one dataset that contains all the information for the 2 charts. I cannot figure out how to use Proc GPLOT to overlay the 2 sets of information. Currently I am creating this chart in excel. It would really save me a lot of time if I could create in SAS. Attached is a document that has screen shots of the 2 separate charts that I have created in EG using the Graph Task and the one manual chart showing both data representations that I am creating manually in excel. I need help figureing out how create one chart with both data representations using SAS EG 7.1.
I have taken a sample of GPLOT and tried to combine the code I get from the tasks in eg to create one chart but I keep getting errors. I am also including the task code for each of the individual charts I have created with EG.
Is there any other information I can provide to assist with pulling this all together. I have been working on this for days and am not getting anywhere. Any assistance would be greatly appreciated.
/* -------------------------------------------------------------------
Code generated by SAS Task
Interleave Bar Chart - Avg Days Open by Tier
Input Data: SASApp:UAT.CH2_DATA
Server: SASApp
------------------------------------------------------------------- */
%_eg_conditional_dropds(WORK.SORTTempTableSorted);
/* -------------------------------------------------------------------
Sort data set SASApp:UAT.CH2_DATA
------------------------------------------------------------------- */
PROC SQL;
CREATE VIEW WORK.SORTTempTableSorted AS
SELECT T.type, T.tier, T.avg_days_open, T.lob
FROM UAT.CH2_DATA as T
;
QUIT;
%_sas_pushchartsize(400,300);
PATTERN1 COLOR=CX333399;
PATTERN2 COLOR=CX969696;
PATTERN3 COLOR = _STYLE_;
PATTERN4 COLOR = _STYLE_;
PATTERN5 COLOR = _STYLE_;
PATTERN6 COLOR = _STYLE_;
PATTERN7 COLOR=CX333399;
PATTERN8 COLOR=CX969696;
PATTERN9 COLOR = _STYLE_;
PATTERN10 COLOR = _STYLE_;
PATTERN11 COLOR = _STYLE_;
PATTERN12 COLOR = _STYLE_;
Axis1
STYLE=1
WIDTH=1
MINOR=
(NUMBER=4
)
LABEL=( FONT='/b' "Avg. Days Open")
;
Axis2
STYLE=1
WIDTH=1
LABEL=NONE
VALUE=NONE
;
Axis3
LABEL=NONE
;
TITLE;
FOOTNOTE;
PROC GCHART DATA=WORK.SORTTempTableSorted
;
VBAR
type
/
SUMVAR=avg_days_open
GROUP=tier
CLIPREF
SPACE=0
FRAME TYPE=SUM
COUTLINE=BLACK
RAXIS=AXIS1
MAXIS=AXIS2
GAXIS=AXIS3
PATTERNID=MIDPOINT
DES=' '
LREF=1
CREF=CX969696
AUTOREF
;
BY lob;
/* -------------------------------------------------------------------
End of task code
------------------------------------------------------------------- */
RUN; QUIT;
%_eg_conditional_dropds(WORK.SORTTempTableSorted);
TITLE; FOOTNOTE;
%_sas_popchartsize;
PATTERN1;
PATTERN2;
PATTERN7;
PATTERN8;
/* -------------------------------------------------------------------
Code generated by SAS Task
Line Plot Chart Code - #Open Issues
Server: SASApp
------------------------------------------------------------------- */
%_eg_conditional_dropds(WORK.SORTTempTableSorted);
/* -------------------------------------------------------------------
Sort data set SASApp:UAT.CH2_DATA
------------------------------------------------------------------- */
PROC SQL;
CREATE VIEW WORK.SORTTempTableSorted AS
SELECT T.type, T.tier, T.avg_days_open, T.lob
FROM UAT.CH2_DATA as T
;
QUIT;
%_sas_pushchartsize(400,300);
PATTERN1 COLOR=CX333399;
PATTERN2 COLOR=CX969696;
PATTERN3 COLOR = _STYLE_;
PATTERN4 COLOR = _STYLE_;
PATTERN5 COLOR = _STYLE_;
PATTERN6 COLOR = _STYLE_;
PATTERN7 COLOR=CX333399;
PATTERN8 COLOR=CX969696;
PATTERN9 COLOR = _STYLE_;
PATTERN10 COLOR = _STYLE_;
PATTERN11 COLOR = _STYLE_;
PATTERN12 COLOR = _STYLE_;
Axis1
STYLE=1
WIDTH=1
MINOR=
(NUMBER=4
)
LABEL=( FONT='/b' "Avg. Days Open")
;
Axis2
STYLE=1
WIDTH=1
LABEL=NONE
VALUE=NONE
;
Axis3
LABEL=NONE
;
TITLE;
FOOTNOTE;
PROC GCHART DATA=WORK.SORTTempTableSorted
;
VBAR
type
/
SUMVAR=avg_days_open
GROUP=tier
CLIPREF
SPACE=0
FRAME TYPE=SUM
COUTLINE=BLACK
RAXIS=AXIS1
MAXIS=AXIS2
GAXIS=AXIS3
PATTERNID=MIDPOINT
DES=' '
LREF=1
CREF=CX969696
AUTOREF
;
BY lob;
/* -------------------------------------------------------------------
End of task code
------------------------------------------------------------------- */
RUN; QUIT;
%_eg_conditional_dropds(WORK.SORTTempTableSorted);
TITLE; FOOTNOTE;
%_sas_popchartsize;
PATTERN1;
PATTERN2;
PATTERN7;
PATTERN8;