TEMPLATE Procedure: Creating a Style Template (Definition) |
PROC TEMPLATE features: |
|
Program Description |
When you are working with styles, you are more likely to modify a SAS style than to write a completely new style. This example shows you how the SAS defined graph style, Science, was created.
Note: Remember that when a STYLE statement creates a style element in the new style, only style elements that explicitly inherit from that style element in the new style inherit the change. When a STYLE statement creates a style element in the new style, all style elements that inherit from that element inherit the definition that is in the new style, so the change appears in all children of the element.
Program |
proc template; define style Styles.Science; |
parent = styles.default; |
style GraphFonts from _self_/ "GraphValueFont" = ("Verdana",10pt) "GraphLabelFont" = ("Verdana",14pt,Bold); |
style Table from Output / cellpadding = 5 cellspacing = 2 bordercolordark = colors("tableborderdark") bordercolorlight = colors("tableborderlight") borderwidth = 2; |
style GraphLabelText from GraphLabelText "Label attributes" / dropshadow = on; |
style GraphBackground "Graph backgroundcolor attributes" / backgroundcolor = colors("docbg") image = "!sasroot\common\textures\Science.gif" textalign = L verticalalign = B; |
style GraphAxisLines from GraphAxisLines "Axis line attributes" / width = 2; |
style GraphBorderLines from GraphBorderLines "Border attributes" / width = 2 color=colors("gaxis"); |
style GraphCharts from GraphCharts "Chart Attributes" / transparency = 0.25; |
style GraphWalls from GraphWalls "Wall Attributes" / gradientdirection = "Xaxis" endcolor = colors("gwalls") transparency = 1.0; |
end; run; |
Copyright © 2008 by SAS Institute Inc., Cary, NC, USA. All rights reserved.