lib/write_xlsx/chart/column.rb in write_xlsx-1.09.4 vs lib/write_xlsx/chart/column.rb in write_xlsx-1.09.5

- old
+ new

@@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- + ############################################################################### # # Column - A class for writing Excel Column charts. # # Used in conjunction with Chart. @@ -32,13 +33,11 @@ super(subtype) @subtype = subtype || 'clustered' @horiz_val_axis = 0 # Override and reset the default axis values. - if @subtype == 'percent_stacked' - @y_axis.defaults[:num_format] = '0%' - end + @y_axis.defaults[:num_format] = '0%' if @subtype == 'percent_stacked' set_y_axis # Set the available data label positions for this chart type. @label_position_default = 'outside_end' @@ -60,10 +59,10 @@ # # Write the <c:barDir> element. # def write_bar_dir - @writer.empty_tag('c:barDir', [ ['val', 'col'] ]) + @writer.empty_tag('c:barDir', [%w[val col]]) end # # Write the <c:errDir> element. Overridden from Chart class since it is not # used in Bar charts.