Data visualization with SAS programming

Removing data labels

Accepted Solution Solved
Reply
New Contributor 608
New Contributor
Posts: 2
Accepted Solution

Removing data labels

[ Edited ]

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;


Accepted Solutions
Solution
‎10-05-2015 05:00 PM
SAS Employee
Posts: 980

Re: Removing data labels

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


All Replies
Super User
Super User
Posts: 7,720

Re: Removing data labels

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. 

Solution
‎10-05-2015 05:00 PM
SAS Employee
Posts: 980

Re: Removing data labels

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

New Contributor 608
New Contributor
Posts: 2

Re: Removing data labels

That does what I need it to do. 

 

Thank you!

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 3 replies
  • 376 views
  • 1 like
  • 3 in conversation