analytics_charts 1.6.0 → 1.6.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/analytics_charts/pie_and_labels.rb +2 -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: c011002b0791849d7f7ed8fbeaefc60906cb1e9a
|
4
|
+
data.tar.gz: bf72ab89b134779a91df419ccb360bcf747726c8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a426ec31bd0182deeaad6ec10ab886121ec8b04be4da237546393694e94ed7938e685d6cef512d0458d2638bc66838dff5e39e36f3c6838baa4edb18e693e959
|
7
|
+
data.tar.gz: d87da7ed8e3b49832cc74ca7d7de99cd816871ca31ca3807f7cca1742103931f5e32206b0278c039952fb5861bcb4201cd4a34c2f48b87dd5265cfd51b73864f
|
@@ -15,12 +15,14 @@ class AnalyticsCharts::PieAndLabels < AnalyticsCharts::CustomPie
|
|
15
15
|
puts @composite_columns
|
16
16
|
@composite_rows = @composite_image.rows
|
17
17
|
@org_text_size = 14
|
18
|
+
organization = organization.gsub(/['%]/, '%' => '%%', "'" => "\'")
|
18
19
|
@org_texts = tokenize_text_by_lines(organization,
|
19
20
|
{'fill' => '#FFFFFF', 'pointsize'=> @org_text_size, 'font_weight'=> 500 })
|
20
21
|
@label_size = 16
|
21
22
|
org_text_offset = @org_texts.size * @org_text_size
|
22
23
|
# (num_labels + 1) to account for white key on bottom of labels
|
23
24
|
@height_with_no_disclaimer = [200 + 20, 20 + @label_size * (num_labels + 1) + 20].max + @composite_rows + org_text_offset
|
25
|
+
disclaimer = disclaimer.gsub(/['%]/, '%' => '%%', "'" => "\'")
|
24
26
|
@disclaimer_texts = tokenize_text_by_lines(disclaimer)
|
25
27
|
@height = @height_with_no_disclaimer + @disclaimer_texts.size * 12 + 5
|
26
28
|
@data = Hash.new # Value is array with two items
|