analytics_charts 1.1.4 → 1.1.5
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 44dcc0bd83faced53baccb85717032d0fe7b04a5
|
4
|
+
data.tar.gz: c0cd007502249e3c65168d0d7b46a8df17ea8b1a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c69429d6ab98d61888e5fcfc29c4e17da9702199b8e8c1c51fd5f74264853a705039822dcf3a0df7f385d3a95d93795a557c16aa646d78e750efe64cbc0c3e35
|
7
|
+
data.tar.gz: 4ed3f22956eb7bf83aa28edf7bdcc0bf59a689ebd4ed1522a8380a8b8f80fa911975ac247d7876d33229d6ffafa851b4f2e24a28dc819ba979a0258c9f708a3f
|
@@ -21,7 +21,7 @@ class AnalyticsCharts::CustomPie
|
|
21
21
|
@pie_label_hash = Hash.new
|
22
22
|
@label_hash = label_hash if label_hash
|
23
23
|
@pie_label_hash = pie_label_hash if pie_label_hash
|
24
|
-
set_pie_colors(%w(#AD1F25 #BE6428 #C1B630 #1E753B #
|
24
|
+
set_pie_colors(%w(#AD1F25 #BE6428 #C1B630 #1E753B #FFFFFF))
|
25
25
|
end
|
26
26
|
|
27
27
|
def set_label_values(label_start_x, label_start_y, label_offset)
|
@@ -73,8 +73,8 @@ class AnalyticsCharts::CustomPie
|
|
73
73
|
@d = @d.ellipse(@pie_center_x, @pie_center_y + 20,
|
74
74
|
5,5,
|
75
75
|
0, 360) # <= +0.5 'fudge factor' gets rid of the ugly gaps
|
76
|
-
draw_pie_label(@pie_center_x,@pie_center_y,
|
77
|
-
@pie_radius, "
|
76
|
+
draw_pie_label(@pie_center_x,@pie_center_y, 45,
|
77
|
+
@pie_radius, "$0", 4)
|
78
78
|
return
|
79
79
|
end
|
80
80
|
if @data.size > 0
|
@@ -20,12 +20,12 @@ class AnalyticsCharts::PieAndLabels < AnalyticsCharts::CustomPie
|
|
20
20
|
@aggregate = Array([0,0,0,0]) # Cluster brands into categories
|
21
21
|
@label_hash = {'pointsize'=> 16,'font_weight'=> 700 }
|
22
22
|
@pie_label_hash = {'pointsize'=> 14, 'font_weight' => 600 }
|
23
|
-
set_pie_colors(%w(#AD1F25 #BE6428 #C1B630 #1E753B #
|
23
|
+
set_pie_colors(%w(#AD1F25 #BE6428 #C1B630 #1E753B #FFFFFF))
|
24
24
|
@base_image = Image.new(@columns, @rows) {
|
25
25
|
self.background_color = "black"
|
26
26
|
}
|
27
27
|
@base_image.composite!(@composite_image,0,0,OverCompositeOp)
|
28
|
-
set_pie_geometry(325,
|
28
|
+
set_pie_geometry(325, 60+ @composite_rows, 50)
|
29
29
|
set_label_values(22, 20+@composite_rows, 16)
|
30
30
|
y_offset = @rows_with_no_disclaimer + @d.get_type_metrics(@dummy_image,"a").height + 5
|
31
31
|
@rows_of_text.each do |text|
|
@@ -54,8 +54,12 @@ class AnalyticsCharts::PieAndLabels < AnalyticsCharts::CustomPie
|
|
54
54
|
end
|
55
55
|
|
56
56
|
def draw_organization
|
57
|
-
insert_text(22, @rows_with_no_disclaimer -
|
57
|
+
insert_text(22, @rows_with_no_disclaimer - 20, @organization,
|
58
58
|
@label_hash.merge({'fill' => '#FFFFFF', 'pointsize'=> 10 }))
|
59
|
+
category_disclaimer = "(categories only for demo purposes)"
|
60
|
+
insert_text(22, @rows_with_no_disclaimer - 10, category_disclaimer,
|
61
|
+
@label_hash.merge({'fill' => '#FFFFFF', 'pointsize'=> 10 }))
|
62
|
+
|
59
63
|
end
|
60
64
|
|
61
65
|
def insert_legend(label, quality)
|
@@ -63,7 +67,7 @@ class AnalyticsCharts::PieAndLabels < AnalyticsCharts::CustomPie
|
|
63
67
|
end
|
64
68
|
|
65
69
|
def draw_legend
|
66
|
-
y_offset =
|
70
|
+
y_offset = 180 + @composite_rows
|
67
71
|
@d.fill_opacity(1)
|
68
72
|
@d.stroke_width(0)
|
69
73
|
@d = @d.stroke 'transparent'
|