google_otg 1.0.13 → 1.0.14

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/VERSION +1 -1
  2. data/google_otg.gemspec +1 -1
  3. data/lib/google_otg.rb +7 -0
  4. metadata +1 -1
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.13
1
+ 1.0.14
data/google_otg.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{google_otg}
8
- s.version = "1.0.13"
8
+ s.version = "1.0.14"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["esilverberg"]
data/lib/google_otg.rb CHANGED
@@ -21,9 +21,15 @@ module GoogleOtg
21
21
  y_labels = [0]
22
22
  data = []
23
23
 
24
+ args[:draw_gchart] = true
25
+
24
26
  if hits[0].is_a?(Array)
25
27
  shape_markers = [['D','6699CC',0,'-1.0',4],['D','FF9933',1,'-1.0',2],['o','0000ff',0,'-1.0',8],['o','FF6600',1,'-1.0',8]]
26
28
  line_colors = ['6699CC','FF9933']
29
+
30
+ lower_bound_time = nil
31
+ hits.map{|series| lower_bound_time = series[0] if !lower_bound_time || series[0].created_at < lower_bound_time.created_at}
32
+ args[:lower_bound_time] = lower_bound_time if lower_bound_time
27
33
 
28
34
  hits.map{|h|
29
35
  converted = hits_to_gchart_range(h, args)
@@ -271,6 +277,7 @@ eos
271
277
  max_y = args.has_key?(:max_y) ? (args[:max_y] > max_y ? args[:max_y] : max_y) : max_y
272
278
 
273
279
  top_y = self.flto10(max_y) + 10
280
+ top_y = max_y if top_y == 10 && args[:draw_gchart]
274
281
  mid_y = self.flto10(top_y / 2)
275
282
  y_labels = y_label_fn.call(mid_y, top_y)
276
283
  ## end y axis labels ##
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google_otg
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.13
4
+ version: 1.0.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - esilverberg