lib/write_xlsx/chart.rb in write_xlsx-1.07.0 vs lib/write_xlsx/chart.rb in write_xlsx-1.08.0

- old
+ new

@@ -1395,11 +1395,11 @@ end end def write_crossing(crossing) # Note, the category crossing comes from the value axis. - if nil_or_max?(crossing) + if [nil, 'max', 'min'].include?(crossing) # Write the c:crosses element. write_crosses(crossing) else # Write the c:crossesAt element. write_c_crosses_at(crossing) @@ -2416,16 +2416,18 @@ if label[:delete] && label[:delete] write_delete(1) elsif label[:formula] write_custom_label_formula(label) + write_d_lbl_pos(parent[:position]) if parent[:position] write_show_val if parent[:value] write_show_cat_name if parent[:category] write_show_ser_name if parent[:series_name] elsif label[:value] write_custom_label_str(label) + write_d_lbl_pos(parent[:position]) if parent[:position] write_show_val if parent[:value] write_show_cat_name if parent[:category] write_show_ser_name if parent[:series_name] else write_custom_label_format_only(label) @@ -2923,12 +2925,8 @@ if format.line_defined? || format.fill_defined? @writer.tag_elements(tag) { write_sp_pr(format) } else @writer.empty_tag(tag) end - end - - def nil_or_max?(val) # :nodoc: - val.nil? || val == 'max' end end end