Creating transparent gridlines
        Posted  
        
            by 
                Rob Penridge
            
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Rob Penridge
        
        
        
        Published on 2012-09-07T15:19:18Z
        Indexed on 
            2012/09/07
            15:38 UTC
        
        
        Read the original article
        Hit count: 286
        
I'm trying to get the chart's gridlines to be transparent but it doesn't seem to be supported:
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?
© Stack Overflow or respective owner