data GTL_GS_NeedleLabel;
format Date Date9.;
format a 4.3;
do i=0 to 334 by 30;
date='01jan2009'd+i; A = 16+ 3*sin(i/90+0.5) + 1*sin(3*i/90+0.7); output;
end;
run;
*
datalabel
datalabelattrs = (symbol = circlefilled)
display = ()
markerattrs = ()
lineattrs = ()
;
ods html;
proc template;
define statgraph _needleplot;
begingraph;
entrytitle "Response over time";
layout overlay / xaxisopts = (display = (ticks tickvalues line) offsetmin = 0) yaxisopts = (label = "Response" offsetmin = 0.5);
needleplot x = date y = a / display = (markers) lineattrs = (thickness = 3) datalabel = a
markerattrs = (symbol = circlefilled size = 11)
datalabelposition = top datalabelattrs = (size = 5);
endlayout;
endgraph;
end;
run;
proc sgrender data = GTL_GS_NeedleLabel template = _needleplot;
run;