%let name=bar7; filename odsout '.'; data a; input ITEM $ 1-6 CLASS $ 8-16 AMOUNT; format amount percent6.0; amount=amount/100; cards; ITEM A 1st CLASS 74 ITEM A 2nd CLASS 12 ITEM A 3rd CLASS 14 ITEM B 1st CLASS 62 ITEM B 2nd CLASS 21 ITEM B 3rd CLASS 17 ITEM C 1st CLASS 43 ITEM C 2nd CLASS 20 ITEM C 3rd CLASS 37 ITEM D 1st CLASS 29 ITEM D 2nd CLASS 41 ITEM D 3rd CLASS 30 ITEM E 1st CLASS 22 ITEM E 2nd CLASS 32 ITEM E 3rd CLASS 46 ; run; data a; set a; length htmlvar $500; htmlvar='title='||quote( 'Item: '|| trim(left(Item)) ||'0D'x|| 'Class: '|| trim(left(Class)) ||'0D'x|| 'Amount: '|| trim(left(amount)) ) ||' '|| 'href="bar8.htm"'; run; GOPTIONS DEVICE=gif; ODS LISTING CLOSE; ODS HTML path=odsout body="&name..htm" (title="Subdivided 100% Bar Chart") style=minimal; goptions noborder; goptions gunit=pct htitle=6 ftitle="albany amt/bold" htext=4.25 ftext="albany amt/bold"; axis1 label=none; axis2 label=none order=(0 to 1 by .1) minor=(number=1) offset=(0,0) value=(h=3pct); legend1 label=none position=(bottom) shape=bar(3,3) across=3; /* pattern v=solid color=red; */ pattern1 v=solid color=cxbd0026; /* reddish color */ pattern2 v=solid color=cx43a2ca; /* this is the hex rgb color for mild blue */ pattern3 v=solid color=cxc7e9b4; /* kind of a seafoam green */ title "Subdivided 100% Bar Chart"; proc gchart data=a; hbar item / discrete type=sum sumvar=amount subgroup=class /* this controls the coloring */ nostats maxis=axis1 /* midpoint axis */ raxis=axis2 /* response/numeric axis */ autoref /* reflines at every major axis tickmark */ legend=legend1 coutline=same html=htmlvar des="" name="&name" ; run; quit; ODS HTML CLOSE; ODS LISTING;