gruffy 1.2.1 → 1.2.2
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/gruffy/side_stacked_bar.rb +5 -3
- data/lib/gruffy/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: 3b4f7ac9dba8dbde52d87251fb6f375b2a918108
|
4
|
+
data.tar.gz: 8aec566cba83b2f931c660b7cb976e7d0ef94258
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: de3e0f440dee12cd061826e0f99b2e59f94c0a05bde1863dc0e00fc369fd78607eb6b962b6fd1e735fca994d13c9b4281cc6909594ba480f9c7e60a00fb917f3
|
7
|
+
data.tar.gz: bd67fe4b86e628a0f40c3e42ea6d9be8d8ee8025e3788f28d47f0eea14dd9baa2d6bc893769d641060673b24d23c406b427a75d2a314b13948f9ea3a231bafd7
|
@@ -21,6 +21,7 @@ class Gruffy::SideStackedBar < Gruffy::SideBar
|
|
21
21
|
#
|
22
22
|
# Columns sit stacked.
|
23
23
|
@bar_spacing ||= 0.9
|
24
|
+
temp_variable_for_draw_labels = []
|
24
25
|
|
25
26
|
@bar_width = @graph_height / @column_count.to_f
|
26
27
|
@d = @d.stroke_opacity 0.0
|
@@ -68,9 +69,8 @@ class Gruffy::SideStackedBar < Gruffy::SideBar
|
|
68
69
|
# we still need to draw the labels
|
69
70
|
# Calculate center based on bar_width and current row
|
70
71
|
label_center = @graph_top + (@bar_width * point_index) + (@bar_width * @bar_spacing / 2.0)
|
71
|
-
|
72
|
+
temp_variable_for_draw_labels << [label_center, point_index]
|
72
73
|
end
|
73
|
-
|
74
74
|
end
|
75
75
|
|
76
76
|
if @show_labels_for_bar_values
|
@@ -81,6 +81,9 @@ class Gruffy::SideStackedBar < Gruffy::SideBar
|
|
81
81
|
end
|
82
82
|
|
83
83
|
@d.draw(@base_image)
|
84
|
+
|
85
|
+
# draw labels after draw graph fixed solution labels hidden
|
86
|
+
temp_variable_for_draw_labels.each {|var| draw_label(var[0], var[1]) }
|
84
87
|
end
|
85
88
|
|
86
89
|
def larger_than_max?(data_point, index=0)
|
@@ -90,5 +93,4 @@ class Gruffy::SideStackedBar < Gruffy::SideBar
|
|
90
93
|
def max(data_point, index)
|
91
94
|
@data.inject(0) {|sum, item| sum + item[DATA_VALUES_INDEX][index]}
|
92
95
|
end
|
93
|
-
|
94
96
|
end
|
data/lib/gruffy/version.rb
CHANGED