I created an animated barchart using proc sgplot. The barchart animates over a period of minutes. I am trying to add in a text box or footnote that shows the current time as the animation progresses. I was able to animate the time, but the animation of the graph disappeared. Below is the code I use to animate the barchart. I have also attached a sample of the dataset that I use. The dataset am is only the am portion of the attached dataset. The dataset myattrmap is imported from another file which details the colors of the bars by group. %macro lineAnnuallyAM(dsn=, start=, end=); %let start = "6:00 AM"t; %let end = "9:30 AM"t; %let dif = %sysfunc(intck(minute,&start,&end)); %do i=0 %to &dif; %let time=%sysfunc(intnx(minute,&start,&i,b),timeampm9.); proc sgplot data=am dattrmap = myattrmap; *used to control the time period shown on the graph; where &start < time < "&time"t; title j=center font = 'Times New Roman' color = white bcolor = '#085156' 'Bethlehem Central School District Deployment Model AM - Vehicles in Operation Carrying Students'; vbar time /response = buses stat = sum group = School_Group datalabel attrid=myid; xaxis display =(nolabel) valuesrotate=vertical values = ("6:00"t to "09:30"t by "0:05"t); yaxis grid values = (0 to 85 by 5); refline "7:35 AM" / axis = x lineattrs=(pattern=2 thickness = 3 color = "#FF0000") label = "7:35 AM"; refline "8:00 AM" / axis = x lineattrs=(pattern=2 thickness = 3 color = "#0000FF") label = "8:00 AM"; refline "9:20 AM" / axis = x lineattrs=(pattern=2 thickness = 3 color = "#00FF00") label = "9:20 AM"; run; quit; %end; %mend lineAnnuallyAM; /*--Create animation--*/ options papersize=('11 in', '7 in') printerpath=gif animation=start animduration=0.25 animloop=no noanimoverlay nonumber; ods printer file='C:\Users\Kristi Titler\OneDrive - Student Transportation Inc\Desktop\AM Deployment.gif'; ods graphics / width=10in height=6in imagefmt=GIF; %lineAnnuallyAM(dsn=am , start="6:00 AM"t, end="09:30 AM"t); options printerpath=gif animation=stop; ods printer close;
... View more