I'd like for the sgplot to have drill downs on the markers instead of in a separate proc report. I need to be able to pass the existing prompts then the value from the line marker value to the sub-stored process prompt. Anyone know how or have advice on how to do it? I only know how in a proc report. I'm using EG 7.1 with M4.
Thanks in advance.
Yes, I found an example where proc gchart generates a graph and a table using a stored process:
http://support.sas.com/rnd/itech/doc9/dev_guide/stprocess/stpsamp.html
*ProcessBody;
%STPBEGIN;
title 'Age analysis by sex';
footnote;
proc sort data=sashelp.class out=class; by sex age; run;
proc gchart data=class;
vbar3d age / group=sex
discrete
nozero
shape=cylinder
patternid=group;
run; quit;
title;
proc print data=class;
by sex age;
id sex age;
var name height weight;
run;
%STPEND;
I'm needing it to be only the month that is clicked on that would be displayed. Example: They click on the May18 marker and a May18 secondary stored process sgplot is created.
Ok, you would need to collect user input and store it in a macro variable like this:
*ProcessBody;
%stpbegin;
title "Product Sales for &MONTH, &YEAR";
proc print data=sales;
where Month eq "&MONTH" and Year eq &YEAR;
var productid product sales salesgoal;
run;
%stpend;
Reference
Both SERIES and SCATTER plots in SGPLOT support the URL= option. The option would reference a character variable in the data set that contains the URL of what you want to display when selected.
How to link that URL to the display you want likely means that the target has to have been created or the page knows how to create something. I suspect the URL could contain parameters as any URL may but the values would have to be calculated and added to the URL variable.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.