%let name=col8; filename odsout '.'; data a; input TIME LOWER UPPER AVERAGE; illusion='bottom'; amount=lower; output; illusion='top'; amount=upper-lower; output; cards; 1 6.5 9.5 7.0 2 6.8 8.7 7.2 3 8.2 10.9 8.3 4 6.4 10.6 8.2 5 6.0 9.7 8.8 6 5.2 9.8 8.1 7 3.2 7.9 6.9 8 5.5 8.0 7.0 9 6.3 10.7 9.1 10 9.3 11.2 10.0 11 8.0 10.0 9.9 12 8.3 10.9 8.4 ; run; data a; set a; length htmlvar $500; if illusion eq 'top' then do; htmlvar='title='||quote( 'Time: '|| trim(left(Time)) ||'0D'x|| 'Max: '|| trim(left(upper)) ||'0D'x|| 'Min: '|| trim(left(lower)) ) ||' '|| 'href="bar1.htm"'; end; run; /* Annotate a symbol on the bars, showing average value. */ data annomark; set a; length html $500; html='title='||quote( 'Time: '|| trim(left(Time)) ||'0D'x|| 'Average: '|| trim(left(average)) ) ||' '|| 'href="bar1.htm"'; length function color $8 text $30; retain xsys ysys '2' when 'a'; function='label'; size=1.75; color='cxbd0026'; position='5'; style='marker'; /* sas/graph 'marker' software font */ text='B'; /* 'B' is a triangle-shaped character in the marker font */ midpoint=time; y=average; output; run; goptions device=png; goptions noborder; ODS LISTING CLOSE; ODS HTML path=odsout body="&name..htm" (title="SAS/Graph gchart Range Chart") style=minimal; goptions gunit=pct htitle=6 ftitle="albany amt/bold" htext=4.25 ftext="albany amt/bold"; axis1 label=('TIME'); axis2 label=(a=90 'AMOUNT') order=(0 to 12 by 2) minor=(number=1) offset=(0,0); pattern1 v=solid color=white; /* the white section of the bar creates the illusion that the blue section is 'floating' */ pattern2 v=solid color=cx43a2ca; /* this is the hex rgb color for mild blue */ title "Range Chart"; title2 "(bar=min/max, marker=avg)"; proc gchart data=a anno=annomark; vbar time / discrete type=sum sumvar=amount subgroup=illusion /* this controls the coloring */ maxis=axis1 /* midpoint axis */ raxis=axis2 /* response/numeric axis */ autoref /* reflines at every major axis tickmark */ cref=graycc nolegend coutline=same space=3 html=htmlvar des="" name="&name"; run; quit; ODS HTML CLOSE; ODS LISTING;