Sample 41367: Remove the header label borders in graphics produced with LAYOUT DATAPANEL or LAYOUT DATALATTICE in the Graph Template Language (GTL)
By default, the header labels produced with the LAYOUT DATALATTICE and LAYOUT DATAPANEL statements in the SAS/GRAPH Graph Template Language (GTL) have borders around them. These borders can be removed by assigning the contrast color of the GraphBorderLines style element to the same color as the GraphBackGround, and specifying the HEADEROPAQUE=FALSE option on the LAYOUT DATALATTICE or LAYOUT DATAPANEL statement.
Select the Full Code tab for sample code that illustrates the syntax.
These sample files and code examples are provided by SAS Institute
Inc. "as is" without warranty of any kind, either express or implied, including
but not limited to the implied warranties of merchantability and fitness for a
particular purpose. Recipients acknowledge and agree that SAS Institute shall
not be liable for any damages whatsoever arising out of their use of this material.
In addition, SAS Institute will provide no support for the materials contained herein.
This sample illustrates how to remove the header label borders in graphics produced with LAYOUT DATAPANEL or LAYOUT DATALATTICE in the Graph Template Language (GTL).
proc template;
define statgraph layoutdatalattice;
begingraph;
entrytitle "Annual Furniture Sales Comparisons";
layout datalattice rowvar=country columnvar=year /
rowdatarange=union headeropaque=false
headerlabeldisplay=value
headerbackgroundcolor=GraphAltBlock:color
rowaxisopts=(display=(tickvalues) griddisplay=on
linearopts=(tickvalueformat=dollar12.))
columnaxisopts=(display=(tickvalues)
timeopts=(tickvalueformat=monname3.));
layout prototype / cycleattrs=true;
seriesplot x=month y=TotalActual / name="Actual";
seriesplot x=month y=TotalPredict / name="Predict";
endlayout;
sidebar / align=bottom;
discretelegend "Actual" "Predict" / border=false;
endsidebar;
endlayout;
endgraph;
end;
run;
proc summary data=sashelp.prdsal2 nway;
class country year month;
var actual predict;
output out=prdsal2 sum=TotalActual TotalPredict;
run;
proc template;
define style styles.noheaderborder;
parent = styles.default;
class graphborderlines /
contrastcolor=white;
class graphbackground /
color=white ;
end;
run;
ods listing close;
ods html image_dpi=100 file='noheaderborder.html' path='.' style=noheaderborder;
ods graphics / reset noborder width=600px height=400px
imagename="noheaderborder" imagefmt=gif;
proc sgrender data=prdsal2 template=layoutdatalattice;
run;
ods html close;
ods listing;
These sample files and code examples are provided by SAS Institute
Inc. "as is" without warranty of any kind, either express or implied, including
but not limited to the implied warranties of merchantability and fitness for a
particular purpose. Recipients acknowledge and agree that SAS Institute shall
not be liable for any damages whatsoever arising out of their use of this material.
In addition, SAS Institute will provide no support for the materials contained herein.
This sample illustrates how to remove the header label borders in graphics produced with LAYOUT DATAPANEL or LAYOUT DATALATTICE in the Graph Template Language (GTL).
Type: | Sample |
Topic: | SAS Reference ==> Procedures ==> SGRENDER
|
Date Modified: | 2010-10-27 15:27:50 |
Date Created: | 2010-10-22 10:29:59 |
Operating System and Release Information
SAS System | SAS/GRAPH | Microsoft Windows Server 2003 Datacenter Edition | 9.2 TS1M0 | |
Microsoft Windows Server 2003 Enterprise Edition | 9.2 TS1M0 | |
Microsoft Windows Server 2003 Standard Edition | 9.2 TS1M0 | |
Microsoft Windows XP Professional | 9.2 TS1M0 | |
Windows Vista | 9.2 TS1M0 | |
Windows Vista for x64 | 9.2 TS1M0 | |
64-bit Enabled AIX | 9.2 TS1M0 | |
64-bit Enabled HP-UX | 9.2 TS1M0 | |
64-bit Enabled Solaris | 9.2 TS1M0 | |
HP-UX IPF | 9.2 TS1M0 | |
Linux | 9.2 TS1M0 | |
Linux for x64 | 9.2 TS1M0 | |
OpenVMS on HP Integrity | 9.2 TS1M0 | |
Solaris for x64 | 9.2 TS1M0 | |
Microsoft® Windows® for x64 | 9.2 TS1M0 | |
Microsoft Windows XP 64-bit Edition | 9.2 TS1M0 | |
Microsoft Windows Server 2003 Enterprise 64-bit Edition | 9.2 TS1M0 | |
Microsoft Windows Server 2003 Datacenter 64-bit Edition | 9.2 TS1M0 | |
Microsoft® Windows® for 64-Bit Itanium-based Systems | 9.2 TS1M0 | |
z/OS | 9.2 TS1M0 | |