def draw(svg, bounds, options={})
colour = options[:theme].grid || options[:theme].marker
if options[:graph].point_markers
point_distance = bounds[:width] / (options[:graph].point_markers.size).to_f
stroke_width = options[:stroke_width]
(0...options[:graph].point_markers.size).map do |idx|
x = point_distance * idx + point_distance/2
svg.line(:x1 => x, :y1 => 0, :x2 => x, :y2 => bounds[:height], :style => "stroke: #{colour.to_s}; stroke-width: #{stroke_width};")
end
svg.line(:x1 => 0, :y1 => 0, :x2 => 0, :y2 => bounds[:height], :style => "stroke: #{colour.to_s}; stroke-width: #{stroke_width};")
svg.line(:x1 => bounds[:width], :y1 => 0, :x2 => bounds[:width], :y2 => bounds[:height], :style => "stroke: #{colour.to_s}; stroke-width: #{stroke_width};")
else
markers = (options[:key_markers] || self.markers) || 5
stroke_width = options[:stroke_width]
each_marker(markers, options[:min_key], options[:max_key], bounds[:width], options, :key_formatter) do |label, x|
svg.line(:x1 => x, :y1 => 0, :x2 => x, :y2 => bounds[:height], :style => "stroke: #{colour.to_s}; stroke-width: #{stroke_width};")
end
end
end