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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cf185c492f9f6f41ecdfc72b3a3f158ce1ff9a05
4
- data.tar.gz: a13e091fca761ae7a9decc122942dc5c18198da0
3
+ metadata.gz: 3b4f7ac9dba8dbde52d87251fb6f375b2a918108
4
+ data.tar.gz: 8aec566cba83b2f931c660b7cb976e7d0ef94258
5
5
  SHA512:
6
- metadata.gz: 015bb83242ce23f1f551576368b3d813a6a0d44f088094e934c7efbb90d359de20bc978930e30c2f24694643c1ab5191ce82d85c05e444a2f416b1ed3c51f7f9
7
- data.tar.gz: af1a381aefcf05fe19b1add9b309ef873bb8549977037959b6600b9a5d76f4d20bc492954c7c0ede4751b997dc35a24ebea8c4f7161b782ba6e21d5153563e87
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
- draw_label(label_center, point_index)
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
@@ -1,3 +1,3 @@
1
1
  module Gruffy
2
- VERSION = '1.2.1'
2
+ VERSION = '1.2.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gruffy
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Wuttikrai Limsakul