Creating transparent gridlines
- by Rob Penridge
I'm trying to get the chart's gridlines to be transparent but it doesn't seem to be supported:
http://support.sas.com/documentation/cdl/en/grstatug/63302/HTML/default/viewer.htm#n1f71f6e9v037an1jy274v66z4r1.htm
I'm doing to try and blend the gridlines with the chart background color (which in my code can change between colors) which would make the gridlines subtle rather than jarring when background colors change.
Here is my code:
**
** TAKE THE DEFAULT STYLE BEING USED. MODIFY IT SO THAT
** GRAPH GRIDLINES WILL BE GREEN AND MOSTLY TRANSPARENT
*;
proc template;
define style my_style;
parent = styles.default;
style GraphGridLines from GraphGridLines / contrastcolor=green transparency=.05;
end;
run;
**
** LAYOUT TEMPLATE FOR A SIMPLE SERIES CHART
*;
proc template;
define statgraph mychart;
begingraph;
layout overlay / wallcolor=black
xaxisopts=(display=(line) griddisplay=on)
yaxisopts=(display=(line))
;
seriesplot x=name y=height / lineattrs=(color=white);
endlayout;
endgraph;
end;
run;
**
** PLOT SAMPLE DATA USING CUSTOM STYLE AND CHART LAYOUT WE JUST DEFINED
*;
ods graphics / width=640 height=640 ;
ods html style=my_style;
proc sgrender data=sashelp.class template=mychart;
run;
ods html close;
Is there another way to achieve this effect by blending the green color with the background color?