proc template;
define statgraph statGraphName style ;
dynamic TITLE1 TITLE2 TITLE3;
begingraph;
entrytitle TITLE1;
How can I include a color style along with other options in proc template? I know this is a simple question but I’m having a hard time finding examples in documentation. My objective is to set the header color for the template.
Hi, This worked for me in SAS 9.4 M3, but did not work in SAS 9.4 M0 (got an error on PANELBY statement). I don't have any other versions to test with. You might want to check with Tech Support or post your question on the SAS/GRAPH and ODS GRAPHICS forum. ( I like pink better than red. So the color should not make a difference -- however, SAS does have a registry list of colors and if you specify a color that isn't in the registry list, it is possible that the color you specify will be mapped to a different color. This happens when you use "named" colors like aliceblue or red or pink -- they always get "translated" to their RGB equivalent.)
cynthia
and, when I use CXFFBA00, this is what I get...is this what you're expecting???
Define header colour, is that the text, the background, the border of the header?
Boarder of the header. In proc report it would be style(header)=[background=#FFBA00]
I'm trying to do the same thing for proc sgpannel.
proc sgpanel data=sashelp.class;
panelby sex / headerbackcolor=red;
scatter y=age x=age;
run;
This doesn't work for setting custom colors FFBA00 is changes the color but has the same result as F9DF97.
Hi, This worked for me in SAS 9.4 M3, but did not work in SAS 9.4 M0 (got an error on PANELBY statement). I don't have any other versions to test with. You might want to check with Tech Support or post your question on the SAS/GRAPH and ODS GRAPHICS forum. ( I like pink better than red. So the color should not make a difference -- however, SAS does have a registry list of colors and if you specify a color that isn't in the registry list, it is possible that the color you specify will be mapped to a different color. This happens when you use "named" colors like aliceblue or red or pink -- they always get "translated" to their RGB equivalent.)
cynthia
and, when I use CXFFBA00, this is what I get...is this what you're expecting???
Cynthia, thanks for solving the color display.
How did you convert the hex color FFBA00 to CXFFBA00 ? I need to make sure it is the same color.
Do I need to create a style to create a color gradient for the bars of a group by in sgpannel? Is this done style template? Can you recomend a good example to base off of?
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 25. Read more here about why you should contribute and what is in it for you!
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.