I don't have a good answer unfortunately for how to do this, though it's possible one exists.
What I do think is that GTL isn't completely listening to you. For example:
proc template;
define style llama;
parent=styles.fancyPrinter;
style CustomFonts from GraphFonts /
'GraphValueFont'=("<sans-serif>, <MTsans-serif>",25pt,italic)
;
style graphUnicodeText from GraphValueText /
color=red;
style graphValueText from GraphValueText/
color=green;
end;
run;
proc template;
define statgraph entry;
begingraph;
layout overlay;
entry halign=right "First entry statement" /
valign=top textattrs=graphValueText;
histogram weight;
entry halign=right "Second entry statement" /
textattrs=graphUnicodeText;
entry halign=right "Third entry statement" /
valign=bottom pad=(bottom=40px);
endlayout;
endgraph;
end;
run;
ods _all_ close;
ods html file="c:\temp\test.html" path="" gpath="c:\temp\" style=llama;
proc sgrender data=sashelp.class template=entry;
run;
ods html close;
Notice you don't get any errors about GraphUnicodeText... but you also don't get any effect from it. My guess is that GTL is doing its work with only partial awareness of the style, and thus isn't able to always respect what you ask it to do.
My suggestion (at least until/unless Sanjay or Dan or similar can help you find a better one) is to use a macro variable and/or a dynamic variable for this purpose.
proc template;
define style llama;
parent=styles.fancyPrinter;
style CustomFonts from GraphFonts /
'GraphValueFont'=("<sans-serif>, <MTsans-serif>",25pt,italic)
;
style graphUnicodeText from GraphValueText /
color=red;
style graphValueText from GraphValueText/
color=green;
end;
run;
proc template;
define statgraph entry;
begingraph;
layout overlay;
dynamic entrycolor;
entry halign=right "First entry statement" /
valign=top;
histogram weight;
entry halign=right "Second entry statement" /
textattrs=(color=entrycolor);
entry halign=right "Third entry statement" /
valign=bottom pad=(bottom=40px);
endlayout;
endgraph;
end;
run;
ods _all_ close;
ods html file="c:\temp\test.html" path="" gpath="c:\temp\" style=llama;
proc sgrender data=sashelp.class template=entry;
dynamic entrycolor="red";
run;
ods html close;
You can then reuse entrycolor
in multiple places in the template, and allow it to be specified by the user at runtime. It's not ideal, but it does work, at least...