| LAYOUT DATAPANEL Statement |
The following graph was generated by the "Example Program":

proc template;
define statgraph layoutdatapanel;
begingraph;
entrytitle "Annual Furniture Sales Comparisons";
layout datapanel classvars=(country year) /
columns=4 rows=3 rowdatarange=union
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=top;
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 sgrender data=prdsal2 template=layoutdatapanel;
run;
By default, the number of cells in the layout is determined by a cross-tabulation table of all the classification variables plus any empty cells needed to complete the last row/column of the grid. The contents of each data cell are based on a graph prototype that you specify in the graph-prototype-block . Optionally, you can enhance the display using one or more sidebar-statement-blocks . For classification variables that have many values, you can use the COLUMNS= and/or ROWS= options with the PANELNUMBER= option to generate multiple panel displays.
The order of the value pairings for the classification variables is determined by the order that the variables are specified on the CLASSVARS= argument, with the last named variable's values varying most rapidly (like nested DO loops). Variable values are always returned in data order.
By default, the first data cell to be filled is in the layout's top-left corner, and data cells are filled from left-to-right, top-to-bottom. Use the START= option to change the starting data cell to the bottom-left corner, and use the ORDER= option to determine whether data cells fill by column or by row. See the START= option for illustrations on how START= and ORDER= interact to manage the fill sequence for data cells.
Note: The DATAPANEL layout is designed to be the outermost layout in the template.
Copyright © 2007 by SAS Institute Inc., Cary, NC, USA. All rights reserved.