analytics_charts 1.4.5 → 1.4.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9b1aee1598609af56b20328ccc22451913d4095d
4
- data.tar.gz: 3873937e937b37ff6fd7de8bbd0565306d928723
3
+ metadata.gz: 4da6cb9c46297810193d9decc430d9e8bbc6499c
4
+ data.tar.gz: ad6dc2d47756d1547c54e6666b16c6f046a5f939
5
5
  SHA512:
6
- metadata.gz: ed00db05c185e80ea38552936d3eb99b9f67c682519a7af245d77a39cde1b0ac83a233d19052c4011b69aedd3017da27ccee86b3317592ff553e91b86befdf28
7
- data.tar.gz: 5d2b51fe68eeaed5790253a51574effd6dbe52355a3526c3f0b7ab45b006c097afae2766302a9e4937769cae425794d6720aaa37d494f0c584503204a9ee36f8
6
+ metadata.gz: 446173e1ecbdc9ebd757c0f484f1d02303ffe20edc1e3cd99ca103bbe8e4091894876cf3a742b2512422e3df28eb279e0d405a3dbac75b4ea88d50b231d8be14
7
+ data.tar.gz: 8747fba1ddfb4f3a2a1350810c990907d110d7320ded1eda78be32eae693b987394a06e30877a7cd8f169164773b48e9584eaa91c5dde074c91d2782ae475dcd
@@ -4,6 +4,7 @@ class AnalyticsCharts::CustomModule
4
4
  include Magick
5
5
  def initialize(image_path, text, output_path)
6
6
  @d = Draw.new
7
+
7
8
  @d.fill = 'white'
8
9
  @d.font = 'Helvetica'
9
10
  @pointsize = 14
@@ -19,6 +20,7 @@ class AnalyticsCharts::CustomModule
19
20
  puts "Had some error in CustomModule, probably a nil calling each"
20
21
  return
21
22
  end
23
+
22
24
  num_separators = @rows_of_text.count {|row| row.empty? }
23
25
  @sep_offset = 7
24
26
  @height = @composite_rows + (@rows_of_text.size - num_separators) * @pointsize + num_separators * @sep_offset
@@ -40,11 +42,11 @@ class AnalyticsCharts::CustomModule
40
42
  y_offset += @pointsize
41
43
  next
42
44
  else
43
- @d.annotate(@base_image, 0 ,0, @pointsize, y_offset, text)
44
45
  if text.empty?
45
46
  y_offset += @sep_offset
46
47
  else
47
48
  y_offset += @pointsize
49
+ @d.annotate(@base_image, 0 ,0, @pointsize, y_offset, text)
48
50
  end
49
51
  end
50
52
  end
@@ -96,7 +96,7 @@ class AnalyticsCharts::CustomPie
96
96
  # overlapping on the text written below
97
97
  @d = Draw.new
98
98
  insert_text(@pie_center_x - 30, @pie_center_y, "No Data",
99
- @label_hash.merge({'fill'=> ' #000000', 'font_weight'=> 700 }))
99
+ @label_hash.merge({'fill'=> '#000000', 'font_weight'=> 700 }))
100
100
  return
101
101
  end
102
102
  if @data.size > 0
@@ -1,3 +1,3 @@
1
1
  module AnalyticsCharts
2
- VERSION = "1.4.5"
2
+ VERSION = "1.4.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: analytics_charts
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.5
4
+ version: 1.4.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - STEPHEN YU