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;

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 4484 views
  • 0 likes
  • 3 in conversation