Class: Writexlsx::Package::ColorScaleFormat
- Inherits:
-
ConditionalFormat
- Object
- ConditionalFormat
- Writexlsx::Package::ColorScaleFormat
- 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
Instance Method Summary collapse
- #write_cf_rule ⇒ Object
-
#write_color_scale ⇒ Object
Write the <colorScale> element.
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_rule ⇒ Object
546 547 548 549 550 |
# File 'lib/write_xlsx/package/conditional_format.rb', line 546 def write_cf_rule @writer.tag_elements('cfRule', attributes) do write_color_scale end end |
#write_color_scale ⇒ Object
Write the <colorScale> element.
555 556 557 558 559 560 561 562 563 564 |
# File 'lib/write_xlsx/package/conditional_format.rb', line 555 def write_color_scale @writer.tag_elements('colorScale') do write_cfvo(min_type, min_value) write_cfvo(mid_type, mid_value) if mid_type write_cfvo(max_type, max_value) write_color(@writer, 'rgb', min_color) write_color(@writer, 'rgb', mid_color) if mid_color write_color(@writer, 'rgb', max_color) end end |