analytics_charts 1.3.2 → 1.3.3
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 +4 -4
- data/lib/analytics_charts/custom_pie.rb +3 -0
- data/lib/analytics_charts/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 72d4818d428573d924a3ce1568e50e55ecabfa77
|
|
4
|
+
data.tar.gz: bfcf55035baf60d8038a9fe1a2c7bbbb4e6fc3ab
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7eeecdf9897588c502f3b2311be8ed3431cbf61bd9286466f0c027c6fbc210f3f0a5493deb40b5e2f45be596596313aea80b1fd68daca25a2f8e2449a40b6dfa
|
|
7
|
+
data.tar.gz: 94f39e0532d49a4a071b0e31d780807567bf00a40c0c97427ac84c56b1fe57fa8081315b9e7dcb3b1ab02073c1d25031c883997bf1a5f1e87a5710878ee73c5e
|
|
@@ -61,6 +61,8 @@ class AnalyticsCharts::CustomPie
|
|
|
61
61
|
features.each { |feature, attribute|
|
|
62
62
|
set_feature(feature, attribute)
|
|
63
63
|
}
|
|
64
|
+
# Double quotes automatically escaped in rails db. Refer to Rmagick doc for escaping stuff
|
|
65
|
+
text = text.gsub(/['%]/, '%' => '%%', "'" => "\'")
|
|
64
66
|
@d.annotate(@base_image, 0 ,0, x_offset, y_offset, text)
|
|
65
67
|
height = @d.get_type_metrics(@base_image, text).ascent
|
|
66
68
|
y_offset -= height / 2
|
|
@@ -75,6 +77,7 @@ class AnalyticsCharts::CustomPie
|
|
|
75
77
|
features.each { |feature, attribute|
|
|
76
78
|
set_feature(feature, attribute)
|
|
77
79
|
}
|
|
80
|
+
text = text.gsub(/['%]/, '%' => '%%', "'" => "\'")
|
|
78
81
|
@d.annotate(@base_image, 0 ,0, x_offset, y_offset, text)
|
|
79
82
|
end
|
|
80
83
|
|