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.
- data/VERSION +1 -1
- data/google_otg.gemspec +1 -1
- data/lib/google_otg.rb +7 -0
- metadata +1 -1
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.14
|
data/google_otg.gemspec
CHANGED
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 ##
|