BookmarkSubscribeRSS Feed
Vince28_Statcan
Quartz | Level 8

Hi,

I find myself with datapoints by timeslices. 18 data points per day as for the business hour (6-24) for a call center. Leaving appearances options and axis statements out (for the Y-axis) not to break the statistic act, here is more or less what my original approach is

symbol1 interpol=join;
options nobyline;

title "something #BYVAL";

legend1 position=(bottom center outside) down=3;

legend2 position=(bottom center outside) down=1;

/*axis1 ...*/

/*axis2 ...*/

axis3 label=("Time") order=("6:00"t to "24:00"t by hour) minor=(number=1) value=(angle=90);

proc gplot data=temp;

     by date;

     label busyhours="Time spent answering calls"

               notreadyhours="Time spent on breaks"

               logonhours="Time spent idle";

     plot (busyhours notreadyhours logonhours)*time / haxis=axis3 vaxis=axis1 overlay areas=3 legend=legend1;

     plot2 droppedcalls*time / vaxis=axis2 legend=legend2;

run;

quit;

Now the above is faulty as it give the representation as though my data was continuous (or almost) where in reality they're hourly aggregates. I simply want to create the alternative output in case the clients need visual explanation of this.

Originally, I was using device=java or device=activex with html output and the object functionalities would allow me to dynamically change one of the graphs from an interpol=join to an interpol=step and it would suffice to depict the concept (it kills the last data point). However, constraints on the client side are such that I can't provide the .JAR or activex .exe and after falling back to PDF output, I find myself unable to reproduce that vbar like effect of interpol=step. In particular, when I change interpol=join to interpol=step in the above for PDF output, I lose the overlay+areas filling effect and a bunch of lines at different height is really awful to seize the information in the graph.

So onwards to the question, which is pretty much the thread title:

How could I achieve, within the same graph, a vbar setup where 3 data values pile up for each data point and have a join curve of a closely related but completely different variable on the right axis.

P.S. I am not keen to using annotate facility as I am unfamiliar with it and the by variable produces 90 graphics (one per day) and it seems like a tedious job to learn annotate with.

Thanks,

Vincent

1 REPLY 1
Vince28_Statcan
Quartz | Level 8

I feel somewhat like an idiot for not having thought of PROC GBARLINE before. However, if anyone reads this and knows a way to have interpol=step work with overlay/areas to achieve the intended output, that would be really appreciated.

Vincent

sas-innovate-2024.png

 

Secure your spot at the must-attend AI and analytics event of 2024: SAS Innovate 2024! Get ready for a jam-packed agenda featuring workshops, super demos, breakout sessions, roundtables, inspiring keynotes and incredible networking events.

 

Register by March 1 to snag the Early Bird rate of just $695! Don't miss out on this exclusive offer. 

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 755 views
  • 3 likes
  • 1 in conversation