%let name=bar5; filename odsout '.'; data a; input ITEM $ 1-6 CLASS $ 8-16 AMOUNT; cards; ITEM A 1st CLASS 7.2 ITEM A 2nd CLASS 3.1 ITEM A 3rd CLASS 1.6 ITEM B 1st CLASS 6.2 ITEM B 2nd CLASS 2.1 ITEM B 3rd CLASS 2.3 ITEM C 1st CLASS 4.8 ITEM C 2nd CLASS 1.9 ITEM C 3rd CLASS .9 ITEM D 1st CLASS 3.7 ITEM D 2nd CLASS 1.1 ITEM D 3rd CLASS 1.9 ITEM E 1st CLASS 2.8 ITEM E 2nd CLASS 2.3 ITEM E 3rd CLASS .9 ITEM F 1st CLASS 1.5 ITEM F 2nd CLASS .9 ITEM F 3rd CLASS .95 ; 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="bar6.htm"'; run; GOPTIONS DEVICE=gif; ODS LISTING CLOSE; ODS HTML path=odsout body="&name..htm" (title="Subdivided 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=('AMOUNT') order=(0 to 12 by 2) minor=(number=1) offset=(0,0); legend1 label=none position=(bottom right inside) cframe=white mode=protect shape=bar(3,3) cborder=black across=1; /* 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 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 */ clipref /* put reflines behind the bars */ cref=graycc legend=legend1 coutline=black html=htmlvar des="" name="&name" ; run; quit; ODS HTML CLOSE; ODS LISTING;