Class: Writexlsx::Package::DataBarFormat

Inherits:
ConditionalFormat show all
Defined in:
lib/write_xlsx/package/conditional_format.rb

Constant Summary

Constants included from Utility

Utility::COL_MAX, Utility::ROW_MAX, Utility::SHEETNAME_MAX, Utility::STR_MAX

Instance Attribute Summary

Attributes inherited from ConditionalFormat

#range

Instance Method Summary collapse

Methods inherited from ConditionalFormat

#attributes, #bar_color, #criteria, #direction, factory, #format, #formula, #initialize, #max_color, #max_type, #max_value, #maximum, #mid_color, #mid_type, #mid_value, #min_color, #min_type, #min_value, #minimum, #priority, #range_param_for_conditional_formatting, #type, #value, #write_cf_rule_formula_tag, #write_cfvo, #write_formula_tag

Methods included from Utility

#absolute_char, #check_dimensions, #check_dimensions_and_update_max_min_values, #check_parameter, #convert_date_time, delete_files, #ptrue?, #put_deprecate_message, #row_col_notation, #store_col_max_min_values, #store_row_max_min_values, #substitute_cellref, #underline_attributes, #write_color, #xl_cell_to_rowcol, #xl_col_to_name, #xl_range, #xl_range_formula, #xl_rowcol_to_cell, #xml_str

Constructor Details

This class inherits a constructor from Writexlsx::Package::ConditionalFormat

Instance Method Details

#write_cf_ruleObject



568
569
570
571
572
# File 'lib/write_xlsx/package/conditional_format.rb', line 568

def write_cf_rule
  @writer.tag_elements('cfRule', attributes) do
    write_data_bar
  end
end

#write_data_barObject

Write the <dataBar> element.



577
578
579
580
581
582
583
584
# File 'lib/write_xlsx/package/conditional_format.rb', line 577

def write_data_bar
  @writer.tag_elements('dataBar') do
    write_cfvo(min_type, min_value)
    write_cfvo(max_type, max_value)

    write_color(@writer, 'rgb', bar_color)
  end
end