analytics_charts 1.4.5 → 1.4.6
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4da6cb9c46297810193d9decc430d9e8bbc6499c
|
4
|
+
data.tar.gz: ad6dc2d47756d1547c54e6666b16c6f046a5f939
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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'=> '
|
99
|
+
@label_hash.merge({'fill'=> '#000000', 'font_weight'=> 700 }))
|
100
100
|
return
|
101
101
|
end
|
102
102
|
if @data.size > 0
|