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

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

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.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

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

View all other training opportunities.

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