BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Meteorite | Level 14

With SAS 9.3 (maybe this is a hint for future usage), you can get the label "exactly" on top of the value using DATALABELPOSITION option.  Unfortunately, we did not add this option to proc SGPLOT, but is availabel in GTL.    You can use this option to create your graph using Rick's data as follows:

proc template;
  define statgraph barline;
      layout overlay;
        barchart x=xvar y=Vbar_Y;
        seriesplot x=xvar y=Plot_Y /  display=(markers) 
                   datalabel=Plot_Y datalabelposition=top
                   datalabelattrs=(size=9) markerattrs=(symbol=circlefilled size=9);       endlayout;     endgraph;   end; run; proc sgrender data=a template=barline;   format plot_y 2.0;

  format xvar monname3.;

  format Vbar_Y dollar6.;



Note the format applied to the plot_y variable in the SGRENDER procedure.  To center the label it is important to strip all leading blanks. Label and marker sizes are increased in this code.

Pyrite | Level 9

Hi Rick,

Thank you very much for this info. But I believe this type of graph is not yet available in 913? I'm currently developing for a client who only has 913. Hope they upgrade to the latest version. Smiley Happy


Meteorite | Level 14

Also, you might be tempted to try to use "proc gbarline" and specify the 'pointlabel' option on the symbol statement, but that's not supported as of SAS 9.3 -- there is a request in for this feature to be added (S0175859), but no specific eta yet.

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 17 replies
  • 4 in conversation