BookmarkSubscribeRSS Feed
Sree_t
Calcite | Level 5
Hi,
I have a grouped subdivided bar chart, where I am printing the statistics subpercent inside the bars and sum of counts outside the bar. How do I change the font size, style etc of these statistics. Please reply, if any one has any solution for this. I tried to set the options for font for the axis, labels etc, but they do not set the statistics.

Thanks,
2 REPLIES 2
ArtC
Rhodochrosite | Level 12
Well it depends on how you are writing the values to the graph. I am unfamiliar with the SUBPERCENT option in GCHART. Could you show me your GCHART step?
GraphGuy
Meteorite | Level 14
One way would be to use the goptions ftext/ctext/htext ... this basically controls *all* the text in the chart. And then you can over-ride the other pieces of text (ie, the text that is not the values in & on the bars) using axis options and such. It's a bit tedious, but do-able...

Here's a short example:

goptions ftext="arial/italic" htext=2.5pct ctext=red;

axis1 label=none value=(font="arial" c=black angle=90);
axis2 label=none value=(font="arial" c=black);
axis3 label=none value=(font="arial" c=black);
legend1 label=none value=(font="arial" c=black);

data foo; set sashelp.revhub2;
format revenue dollar5.1;
revenue=revenue/1000000;
run;
proc gchart data=foo (where=(hub in ('Tokyo' 'Sydney')));
vbar type / type=sum sumvar=revenue subgroup=source group=hub
space=0 maxis=axis1 raxis=axis2 gaxis=axis3 outside=sum inside=pct
width=15 legend=legend1;
run;

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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