No matter what I try, the fonts in my graphs do not change.
I am using ODS Powerpoint to generate routine reports and graphs directly to Powerpoint. I have used PROC TEMPLATE to set up my custom style. For my Tables, generated through PROC TABULATE, my fonts and other elements seem to be working fine. So I started building my charts. No matter what I do, though, the fonts never change. In the SAS results window, they are always ARIAL and always the same size. When I open the results in Powerpoint, they are always what looks like Courier and in a small font. They are also exactly the same no matter whether they are a title or and axis label or a value label. I've tried changing the fonts in my PROC TEMPLATE. Nothing changes. I've tried adding FONT= and HEIGHT= to my title. Still nothing changes.
Where else is there to look?
Which style is your Powerpoint using? If it wasn't based on the right parent then you may have problems.
Also showing code you have used where the "titles didn't change" might help. Proc template and the graphic procedure along with the ODS statement.
I created the style "Powerpointlight" per instructions I found elsewhere on SAS websites. Then created my custom style based off of that.
Here is the first part of my custom style:
PROC TEMPLATE ;
define style styles.capm;
parent=styles.powerpointlight;
style fonts /
'TitleFont2' = ("Georgia, Palatino, <MTserif>, Times Roman",16pt)
'TitleFont' = ("Georgia, Palatino, <MTserif>, Times Roman",16pt)
'StrongFont' = ("Palatino, Book Antiqua, <MTserif>, Times Roman",10pt,bold)
'EmphasisFont' = ("Palatino, Book Antiqua, <MTserif>, Times Roman",10pt,bold italic)
'FixedEmphasisFont' = ("<MTmonospace>, Courier",16pt,italic)
'FixedStrongFont' = ("<MTmonospace>, Courier",16pt,bold)
'FixedHeadingFont' = ("<MTmonospace>, Courier",16pt,bold)
'BatchFixedFont' = ("SAS Monospace, <MTmonospace>, Courier",16pt)
'FixedFont' = ("<MTmonospace>, Courier",16pt)
'headingEmphasisFont' = ("Georgia, Palatino, <MTserif>, Times Roman",16pt)
'headingFont' = ("Georgia, Palatino, <MTserif>, Times Roman",16pt)
'docFont' = ("Georgia, <MTserif>, Times Roman",16pt)
'footFont' = ("Georgia, <MTserif>, Times Roman",16pt);
class GraphFonts /
'NodeDetailFont' = ("Georgia, Palatino, <MTserif>, Times Roman",16pt)
'NodeInputLabelFont' = ("Georgia, Palatino, <MTserif>, Times Roman",16pt)
'NodeLabelFont' = ("Georgia, Palatino, <MTserif>, Times Roman",16pt)
'NodeTitleFont' = ("Georgia, Palatino, <MTserif>, Times Roman",16pt)
'GraphDataFont' = ("Georgia, Palatino, <MTserif>, Times Roman",16pt)
'GraphUnicodeFont' = ("Georgia, Palatino, <MTserif>, Times Roman",16pt)
'GraphValueFont' = ("Georgia, Palatino, <MTserif>, Times Roman",16pt)
'GraphLabel2Font' = ("Georgia, Palatino, <MTserif>, Times Roman",16pt)
'GraphLabelFont' = ("Georgia, Palatino, <MTserif>, Times Roman",16pt)
'GraphFootnoteFont' = ("Georgia, Palatino, <MTserif>, Times Roman",16pt)
'GraphTitleFont' = ("Arial",14pt,Bold)
'GraphTitle1Font' = ("Georgia, Palatino, <MTserif>, Times Roman",16pt)
'GraphAnnoFont' = ("Georgia, Palatino, <MTserif>, Times Roman",16pt);
And here is the graph code where I try to set the font as well:
Title1 "My Graph Title" f='Times' h=14pt ;
proc gchart data=ChartData;
vbar valuetype / discrete subgroup=ValueType group=quarter sumvar=Value
legend=legend1 space=0 gspace=4
maxis=axis1 raxis=axis2 gaxis=axis3
coutline=white cframe=white
;
@Josiah wrote:
I created the style "Powerpointlight" per instructions I found elsewhere on SAS websites. Then created my custom style based off of that.
Here is the first part of my custom style:
PROC TEMPLATE ;
define style styles.capm;
parent=styles.powerpointlight;style fonts /
'TitleFont2' = ("Georgia, Palatino, <MTserif>, Times Roman",16pt)
'TitleFont' = ("Georgia, Palatino, <MTserif>, Times Roman",16pt)
'StrongFont' = ("Palatino, Book Antiqua, <MTserif>, Times Roman",10pt,bold)
'EmphasisFont' = ("Palatino, Book Antiqua, <MTserif>, Times Roman",10pt,bold italic)
'FixedEmphasisFont' = ("<MTmonospace>, Courier",16pt,italic)
'FixedStrongFont' = ("<MTmonospace>, Courier",16pt,bold)
'FixedHeadingFont' = ("<MTmonospace>, Courier",16pt,bold)
'BatchFixedFont' = ("SAS Monospace, <MTmonospace>, Courier",16pt)
'FixedFont' = ("<MTmonospace>, Courier",16pt)
'headingEmphasisFont' = ("Georgia, Palatino, <MTserif>, Times Roman",16pt)
'headingFont' = ("Georgia, Palatino, <MTserif>, Times Roman",16pt)
'docFont' = ("Georgia, <MTserif>, Times Roman",16pt)
'footFont' = ("Georgia, <MTserif>, Times Roman",16pt);class GraphFonts /
'NodeDetailFont' = ("Georgia, Palatino, <MTserif>, Times Roman",16pt)
'NodeInputLabelFont' = ("Georgia, Palatino, <MTserif>, Times Roman",16pt)
'NodeLabelFont' = ("Georgia, Palatino, <MTserif>, Times Roman",16pt)
'NodeTitleFont' = ("Georgia, Palatino, <MTserif>, Times Roman",16pt)
'GraphDataFont' = ("Georgia, Palatino, <MTserif>, Times Roman",16pt)
'GraphUnicodeFont' = ("Georgia, Palatino, <MTserif>, Times Roman",16pt)
'GraphValueFont' = ("Georgia, Palatino, <MTserif>, Times Roman",16pt)
'GraphLabel2Font' = ("Georgia, Palatino, <MTserif>, Times Roman",16pt)
'GraphLabelFont' = ("Georgia, Palatino, <MTserif>, Times Roman",16pt)
'GraphFootnoteFont' = ("Georgia, Palatino, <MTserif>, Times Roman",16pt)
'GraphTitleFont' = ("Arial",14pt,Bold)
'GraphTitle1Font' = ("Georgia, Palatino, <MTserif>, Times Roman",16pt)
'GraphAnnoFont' = ("Georgia, Palatino, <MTserif>, Times Roman",16pt);
And here is the graph code where I try to set the font as well:
Title1 "My Graph Title" f='Times' h=14pt ;
proc gchart data=ChartData;
vbar valuetype / discrete subgroup=ValueType group=quarter sumvar=Value
legend=legend1 space=0 gspace=4
maxis=axis1 raxis=axis2 gaxis=axis3
coutline=white cframe=white
;
I suggest changing from Proc Gchart, which is device based graphics and uses some different settings than the ODS template for some output elements, to Proc Sgplot which will use the ODS style elements more consistently. SGPlot does not have direct equivalents of the maxis/gaxis pairs and the syntax for XAXIS and YAXIS as used by SGPlot is different than the AXIS statements used by the device based graph procedures such as GChart.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.
Select SAS Training centers are offering in-person courses. View upcoming courses for: