Data visualization with SAS programming

gchart - how to change the fontsize of statistics - subpercent, sum etc

Reply
N/A
Posts: 1

gchart - how to change the fontsize of statistics - subpercent, sum etc

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,
Valued Guide
Posts: 632

Re: gchart - how to change the fontsize of statistics - subpercent, sum etc

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?
SAS Employee
Posts: 967

Re: gchart - how to change the fontsize of statistics - subpercent, sum etc

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;
Ask a Question
Discussion stats
  • 2 replies
  • 546 views
  • 0 likes
  • 3 in conversation