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

I am building a variable width bar chart (I am attempting to use proc gareabar for the first time).

 

The example here is great:

https://support.sas.com/documentation/cdl/en/graphref/63022/HTML/default/viewer.htm#a002299562.htm

 

However, I want to remove the data labels.  (I do not want 27, 80, or 46 to show up on the graph).  The method I have used for removing data labels for other procedures is not working for this procedure.  

 

Any suggestions would be greatly appreciated. 

 

gabsumvr.gif

 

goptions reset=all dev=activex;

data totals;
input Site $ Quarter Sales Salespersons;
format Sales dollar12.2;
datalines;
Lima 1 4043.97 4
NY 1 8225.26 12
Rome 1 3543.97 6
Lima 2 3723.44 5
NY 2 8595.07 18
Rome 2 5558.29 10
Lima 3 4437.96 8
NY 3 9847.91 24
Rome 3 6789.85 14
Lima 4 6065.57 10
NY 4 11388.51 26
Rome 4 8509.08 16
;

ods listing close;

ods html;

proc gareabar data=totals;
vbar site*salespersons /
sumvar=sales;
run;
quit;

ods html close;

ods listing;

1 ACCEPTED SOLUTION

Accepted Solutions
GraphGuy
Meteorite | Level 14

I do not know of a way to programmatically remove these labels [perhaps there's an html parameter that could be set, such as the following, but I don't see anything documented:  ODS HTML parameters=("show_area_labels"="false"); ]

 

Since this is an interactive activex chart, you can right-click and run the "Graph properties" menu, and then select the "Area bar" tab, and un-check the "Show labels" checkbox ... for a one-time view of the chart the way you're wanting it. 

 

 gareabar_properties.png

gareabar.png

View solution in original post

3 REPLIES 3
RW9
Diamond | Level 26 RW9
Diamond | Level 26

Hi,

 

Well, never heard of this procedure before, I would always use either proc sgplot, or Graph Template Language.  Preferable GTL.  Then you have full functionality to alter labels and what comes out.  Check out this blog which has examples of pretty much anything you could want to do with graphs:

http://blogs.sas.com/content/graphicallyspeaking/

 

You should find plenty of examples where bar charts are done, with adding data labels, or other things. 

GraphGuy
Meteorite | Level 14

I do not know of a way to programmatically remove these labels [perhaps there's an html parameter that could be set, such as the following, but I don't see anything documented:  ODS HTML parameters=("show_area_labels"="false"); ]

 

Since this is an interactive activex chart, you can right-click and run the "Graph properties" menu, and then select the "Area bar" tab, and un-check the "Show labels" checkbox ... for a one-time view of the chart the way you're wanting it. 

 

 gareabar_properties.png

gareabar.png

608
Calcite | Level 5 608
Calcite | Level 5

That does what I need it to do. 

 

Thank you!

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

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
  • 1870 views
  • 1 like
  • 3 in conversation