The SAS Output Delivery System and reporting techniques

Center Justifying Text Inside a GChart Bar Chart

Reply
N/A
Posts: 0

Center Justifying Text Inside a GChart Bar Chart

Hello Everyone,

I created a 100% stacked horizontal bar chart using PROC GChart with the following code:

proc gchart data=&input_ds;
hbar region /
nozero
nostats
raxis=axis2
maxis=axis1
percent
sumvar=per
legend = legend1
type=sum
inside=subpercent
subgroup=value
width=2;
run;

This code produces a variable number of bars with each bar subdivided by value and has several sub-group percentages inside each bar. The problem is that the percentages appear to be right justified. Is there a way I can have them be center justified?

I would like the text that is inside each bar to be center justified kind of like how it is in MS Excel or in this picture: http://peltiertech.com/WordPress/wp-content/img200808/GasPricesBarChart.png ..... rather than getting numbers that are right justified as they are in the following picture: http://robslink.com/SAS/democd18/insur.htm. Any ideas if this is possible, and if so how to do it?
Super Contributor
Super Contributor
Posts: 3,174

Re: Center Justifying Text Inside a GChart Bar Chart

Posted in reply to deleted_user
SAS support website indicates that the SAS/Graph DEVICE driver ACTIVEX does support VALUE=INSIDE, even though the SASLOG indicates otherwise (at least in SAS 8). So, it may be that you can specify VALUE=(JUSTIFY=CENTER) on the AXISn statement to achieve your desired result. If not, I would recommend contacting SAS support for guidance and to get your interests registered with the technical staff, for future consideration.

Also, here is a Google advanced search argument you might want to use to identify SAS support website http://support.sas.com/ resource references for your post/question:

+gchart +inside +justify +center +axis +value site:sas.com

Scott Barry
SBBWorks, Inc.
TS-602

Compatibility Document for the ACTIVEX Device Driver - Version 8 Releases
**This document applies to Version 8 Releases. If you are running SAS/GRAPH 9 or above, please refer to the documentation or online help for the most recent information.

http://support.sas.com/techsup/technote/ts602.html#BAR
Ask a Question
Discussion stats
  • 1 reply
  • 156 views
  • 0 likes
  • 2 in conversation