/****************************************************************/ /* Example of adding Harvey Balls to SAS reports */ /* Published on The SAS Dummy blog: */ /* http://blogs.sas.com/content/sasdummy/using-harvey-balls/ */ /* Support: Chris Hemedinger */ /****************************************************************/ /* Format to turn 0-4 into Harvey ball glyphs */ ods escapechar='~'; proc format lib=work; value hb 0 = "~{unicode '25CB'x}" /* empty circle */ 1 = "~{unicode '25D4'x}" /* quarter */ 2 = "~{unicode '25D1'x}" /* half */ 3 = "~{unicode '25D5'x}" /* three-quarter */ 4 = "~{unicode '25CF'x}" /* full */ ; /* Test data */ data progress; length stage $ 30 dev 8 test 8 prod 8; infile datalines dsd; input stage dev test prod; datalines; System Requirements,4,4,4 Hardware procurement,4,2,1 Application installation,3,3,0 System configuration,3,2,0 System test,2,1,0 User acceptance,1,1,0 ; run; title "Progress on Our Very Important Project"; /* Report that uses the format */ /* Note that since the font glyphs are very small */ /* I've added additional format directives to */ /* boost font size and fix alignments */ proc report data=progress; columns stage dev test prod; define stage / 'Activity' display style=[verticalalign=center]; define dev / '% Dev' format=hb. style(column)=[ font_face='Lucida Sans Unicode' font_size=18pt verticalalign=center just=c color=blue ]; define test / '% Test' format=hb. style(column)=[ font_face='Lucida Sans Unicode' font_size=18pt verticalalign=center just=c color=blue ]; define prod / '% Prod' format=hb. style(column)=[ font_face='Lucida Sans Unicode' font_size=18pt verticalalign=center just=c color=blue ]; run;