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, #dash_types, delete_files, #fill_properties, #float_to_str, #layout_properties, #line_fill_properties, #line_properties, #palette_color, #pixels_to_points, #ptrue?, #put_deprecate_message, #r_id_attributes, #row_col_notation, #shape_style_base, #store_col_max_min_values, #store_row_max_min_values, #substitute_cellref, #underline_attributes, #v_shape_attributes_base, #v_shape_style_base, #value_or_raise, #write_anchor, #write_auto_fill, #write_color, #write_comment_path, #write_div, #write_fill, #write_font, #write_stroke, #write_xml_declaration, #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
550 551 552 553 554 |
# File 'lib/write_xlsx/package/conditional_format.rb', line 550 def write_cf_rule @writer.tag_elements('cfRule', attributes) do write_color_scale end end |
#write_color_scale ⇒ Object
Write the <colorScale> element.
559 560 561 562 563 564 565 566 567 568 |
# File 'lib/write_xlsx/package/conditional_format.rb', line 559 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 |