BookmarkSubscribeRSS Feed
tparvaiz
Obsidian | Level 7

Hi,

I am using GCHART to display some bars... May I know how to show the value for each bar...

Thanks in advance

3 REPLIES 3
ballardw
Super User

as part of the options for the VBAR or HBAR   INSIDE= <statistic > or OUTSIDE=<statistic> (best without subgrouping).

There are some limitations on which statistic depending on whether the subgroup option is used.

The online help for HBAR, HBAR3D, VBAR and VBAR3D statement in GCHART has details.

reneeharper
SAS Employee

We have some great samples using PROC GCHART that you might find useful.   They are available on support.sas.com at http://support.sas.com/sassamples/graphgallery/PROC_GCHART.html.  Other graphic samples are also available another level up at http://support.sas.com/sassamples/graphgallery/index.html.

I always find sample code helpful. I hope you find this to be a useful resource as well.


GraphGuy
Meteorite | Level 14

A few extra tips...

If the value won't fit on top of a vbar, you might try increasing the width of the bars (using the width= option).

Hbars typically print their values in a table to the right of the graph, rather than at the ends of the bars.

And if the built-in options/features don't provide what you're after, you can use "annotate" to place whatever text you want with each bar.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 3 replies
  • 1810 views
  • 0 likes
  • 4 in conversation