Method: Graphit::Graph#draw_vertical_gridlines

Defined in:
lib/graphit/graph.rb

#draw_vertical_gridlinesObject



159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
# File 'lib/graphit/graph.rb', line 159

def draw_vertical_gridlines
  (self.xmin.to_i..self.xmax.to_i).each do |x|
    if x % self.xticsmod == 0
      p1 = translate_data_point_to_graph_point( Point.new( x, self.ymin ) )
      p2 = translate_data_point_to_graph_point( Point.new( x, self.ymax ) )
  
      #Manual offset for GMT-7
      if (x + (3600*-7)) % 86400 == 0
        lcolor = [0x00,0x00,0xFF]
      else
        lcolor = [0xAA,0xAA,0xAA]
      end
  
  
      self.bitmap_drawing.draw_line( Point.new( p1.x, p1.y ), Point.new( p2.x, p2.y ), lcolor )
    end
  end
end