Hi,
I can't find the option to have the gridlines over my bars,
not under but on top of them.
I use sgrender with gtl like this :
* style template;
proc template;
define style styles.alertlevels;
parent=wivisp_sasstyle;
style GraphColors from GraphColors /
'gdata1' = CXD6E1F1
'gdata2' = CXDEBEAD
'gdata3' = CXE59C69
'gdata4' = CXED7925
;
class graphgridlines / contrastcolor=colors('wivisp3') color=red ;
end;
run;
* graph template;
proc template;
title;footnote;
define statgraph ALbarchart;
dynamic latin source;
begingraph / border=false;
entrytitle "Early warning index";
entrytitle latin;
entryfootnote "© WIV-ISP – Data Source:" source;
layout overlay /
yaxisopts=(label='Cases / week'
griddisplay=on
display=(label tickvalues))
xaxisopts=(label='week'
griddisplay=off
display=(label tickvalues ticks));
barchart x=Date y=Cases /
group=AlertLevel
index=index
barwidth=.8
name='zut'
outlineattrs=(thickness=0 color=white)
datatransparency=0
legendlabel='Alert Level'
grouporder=ascending;
discretelegend 'zut'/
border=false
title='Alert Level';
endlayout;
endgraph;
end;
run;
There is no option in GTL to place grid lines on top of the plots. Grids always go behind the plots.
But, you have two other ways to do this. You can make the bar chart a bit transparent. Or, instead of turning on gridlines, draw reference lines at each major tick value on the appropriate axis. You can use LINEATTRS=GRAPHGRIDS to get the same visual properties.
You might want to try using the REFERENCELINE statement.
There is no option in GTL to place grid lines on top of the plots. Grids always go behind the plots.
But, you have two other ways to do this. You can make the bar chart a bit transparent. Or, instead of turning on gridlines, draw reference lines at each major tick value on the appropriate axis. You can use LINEATTRS=GRAPHGRIDS to get the same visual properties.
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.