diff options
| -rw-r--r-- | lib/axlsx.rb | 4 | ||||
| -rw-r--r-- | lib/axlsx/drawing/chart.rb | 2 | ||||
| -rw-r--r-- | lib/axlsx/workbook/worksheet/cell.rb | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/lib/axlsx.rb b/lib/axlsx.rb index b56f82cf..1dfdbd92 100644 --- a/lib/axlsx.rb +++ b/lib/axlsx.rb @@ -56,8 +56,8 @@ module Axlsx def self.name_to_indices(name) raise ArgumentError, 'invalid cell name' unless name.size > 1 - v = name[/[A-Z]+/].reverse.chars.reduce({:base=>1, :i=>0}) do |v, c| - v[:i] += ((c.bytes.first - 65) + v[:base]); v[:base] *= 26; v + v = name[/[A-Z]+/].reverse.chars.reduce({:base=>1, :i=>0}) do |val, c| + val[:i] += ((c.bytes.first - 65) + val[:base]); val[:base] *= 26; val end [v[:i]-1, ((name[/[1-9]+/]).to_i)-1] diff --git a/lib/axlsx/drawing/chart.rb b/lib/axlsx/drawing/chart.rb index 831dff8b..0a8068df 100644 --- a/lib/axlsx/drawing/chart.rb +++ b/lib/axlsx/drawing/chart.rb @@ -137,7 +137,7 @@ module Axlsx xml.layout xml.overlay :val => 0 } - end + end xml.plotVisOnly :val => 1 xml.dispBlanksAs :val => :zero xml.showDLblsOverMax :val => 1 diff --git a/lib/axlsx/workbook/worksheet/cell.rb b/lib/axlsx/workbook/worksheet/cell.rb index 9e4dbdc2..5e7f594f 100644 --- a/lib/axlsx/workbook/worksheet/cell.rb +++ b/lib/axlsx/workbook/worksheet/cell.rb @@ -205,8 +205,8 @@ module Axlsx def shareable(v) #using reject becase 1.8.7 select returns an array... - v_hash = v.instance_values.reject { |k, v| !INLINE_STYLES.include?(k) } - self_hash = self.instance_values.reject { |k, v| !INLINE_STYLES.include?(k) } + v_hash = v.instance_values.reject { |key, val| !INLINE_STYLES.include?(key) } + self_hash = self.instance_values.reject { |key, val| !INLINE_STYLES.include?(key) } # required as color is an object, and the comparison will fail even though both use the same color. v_hash['color'] = v_hash['color'].instance_values if v_hash['color'] self_hash['color'] = self_hash['color'].instance_values if self_hash['color'] |
