%let name=bar3; filename odsout '.'; data my_data; input ITEM $ 1-6 AMOUNT PREVIOUS; datalines; ITEM A 11.8 10.8 ITEM B 10.5 8.8 ITEM C 8.4 7.8 ITEM D 5.8 6.4 ITEM E 4.4 5.0 ITEM F 2.3 1.6 ; run; data my_data; set my_data; length htmlvar $300; htmlvar= 'title='||quote( 'Item: '|| trim(left(item)) ||'0D'x|| 'Amount: '|| trim(left(amount)) )|| ' href="bar3_info.htm"'; run; /* Annotate a symbol on the bars, showing previous year's value. */ data anno_mark; set my_data; length function color $8 text $30; xsys='2'; ysys='2'; hsys='3'; when='a'; midpoint=item; x=previous; function='label'; size=3.75; color='cxbd0026'; position='5'; style='marker'; /* sas/graph 'marker' software font */ text='P'; /* 'P' is a diamond-shape in the marker font */ length html $500; html= 'title='||quote( 'Item: '|| trim(left(item)) ||'0D'x|| 'Previous Year Amount: '|| trim(left(previous)) )|| ' href="bar3_info.htm"'; output; run; goptions device=png; goptions noborder; ODS LISTING CLOSE; ODS HTML path=odsout body="&name..htm" (title="GChart Bar-And-Symbol Chart") style=htmlblue; goptions gunit=pct htitle=6 ftitle="albany amt/bold" htext=4.25 ftext="albany amt/bold"; goptions ctext=gray33; axis1 label=none offset=(8,8); axis2 label=('AMOUNT') order=(0 to 12 by 2) minor=(number=1) offset=(0,0); pattern v=solid color=cx43a2ca; /* this is the hex rgb color for mild blue */ title1 ls=1.5 "Bar-And-Symbol Chart"; title2 "(bar=current year, symbol=previous year's value)"; proc gchart data=my_data anno=anno_mark; hbar item / discrete type=sum sumvar=amount nostats maxis=axis1 raxis=axis2 autoref clipref space=2 cref=graycc coutline=black html=htmlvar des='' name="&name"; run; quit; ODS HTML CLOSE; ODS LISTING;