The SAS Output Delivery System and reporting techniques

ODS Graphics: GTL, BARCHART, and BARLABEL

Reply
N/A
Posts: 0

ODS Graphics: GTL, BARCHART, and BARLABEL

How can I display the bar statistic value at the end of the bar?

I've tried the BARCHART statement's BARLABEL option, but it generates an error when running PROC TEMPLATE.

Thanks,
Randy

proc template;
define statgraph b_test;
begingraph / border=false ;
layout overlay / xaxisopts=(display=none) yaxisopts=(display=none) WALLDISPLAY=NONE ;
barchart x=value / name="legend" orient=vertical display=standard barlabel=true barwidth=1
fillattrs=(color=RED) OUTLINEATTRS=(color=black);
endlayout;
endgraph;
end;
run;
Super Contributor
Super Contributor
Posts: 3,174

Re: ODS Graphics: GTL, BARCHART, and BARLABEL

Care to share the exact SAS error message you receive?

Scott Barry
SBBWorks, Inc.
N/A
Posts: 0

Re: ODS Graphics: GTL, BARCHART, and BARLABEL

With BARLABEL option:

proc template;
387 define statgraph b_test;
388 begingraph / border=false ;
389 layout overlay / xaxisopts=(display=none) yaxisopts=(display=none) WALLDISPLAY=NONE ;
390 barchart x=value / name="legend" orient=vertical display=standard barlabel=true barwidth=1
--------
22
76
ERROR 22-322: Syntax error, expecting one of the following: ;, BARWIDTH, CONNECTATTRS,
DATASELECTABLE, DATATRANSPARENCY, DISPLAY, FILLATTRS, GROUP, GROUPORDER, INDEX,
LEGENDLABEL, NAME, ORIENT, OUTLINEATTRS, PRIMARY, STAT, TIP, TIPFORMAT, TIPLABEL,
URL, XAXIS, YAXIS.
ERROR 76-322: Syntax error, statement will be ignored.
391 fillattrs=(color=RED) OUTLINEATTRS=(color=black);
392 endlayout;
393 endgraph;
394 end;
WARNING: Object will not be saved.
395 run;
NOTE: PROCEDURE TEMPLATE used (Total process time):
real time 0.07 seconds
cpu time 0.03 seconds

Without BARLABEL option:

proc template;
397 define statgraph b_test;
398 begingraph / border=false ;
399 layout overlay / xaxisopts=(display=none) yaxisopts=(display=none) WALLDISPLAY=NONE ;
400 barchart x=value / name="legend" orient=vertical display=standard barwidth=1
401 fillattrs=(color=RED) OUTLINEATTRS=(color=black);
402 endlayout;
403 endgraph;
404 end;
NOTE: STATGRAPH 'B_test' has been saved to: SASUSER.TEMPLAT
405 run;
NOTE: PROCEDURE TEMPLATE used (Total process time):
real time 0.18 seconds
cpu time 0.00 seconds
SAS Super FREQ
Posts: 8,744

Re: ODS Graphics: GTL, BARCHART, and BARLABEL

Hi:
The documentation implies that BARLABEL=TRUE should work:
http://support.sas.com/documentation/cdl/en/grstatgraph/61949/HTML/default/barchart_sect4.htm#grstat...

If you find that it doesn't work, you might wish to work with SAS Tech Support to find an answer.

cynthia
Ask a Question
Discussion stats
  • 3 replies
  • 387 views
  • 0 likes
  • 3 in conversation