Class: Writexlsx::Package::DataBarFormat
- Inherits:
-
ConditionalFormat
- Object
- ConditionalFormat
- Writexlsx::Package::DataBarFormat
- Defined in:
- lib/write_xlsx/package/conditional_format.rb
Constant Summary
Constants included from Utility
Utility::CHAR_WIDTHS, Utility::COL_MAX, Utility::DEFAULT_COL_PIXELS, Utility::MAX_DIGIT_WIDTH, Utility::PADDING, Utility::PERL_TRUE_VALUES, 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_data_bar ⇒ Object
Write the <dataBar> element.
-
#write_data_bar_ext(param) ⇒ Object
Write the <extLst> dataBar extension element.
Methods inherited from ConditionalFormat
#attributes, #bar_axis_color, #bar_axis_position, #bar_border_color, #bar_color, #bar_negative_color, #bar_negative_color_same, #bar_no_border, #bar_only, #criteria, #direction, factory, #format, #formula, #icon_style, #icons, #icons_only, #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, #reverse_icons, #stop_if_true, #total_icons, #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, #color, #convert_date_time, #convert_font_args, #dash_types, delete_files, #escape_url, #fill_properties, #float_to_str, #get_font_latin_attributes, #get_font_style_attributes, #layout_properties, #legend_properties, #line_fill_properties, #line_properties, #palette_color_from_index, #params_to_font, #pattern_properties, #pixels_to_points, #ptrue?, #put_deprecate_message, #quote_sheetname, #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_a_body_pr, #write_a_def_rpr, #write_a_end_para_rpr, #write_a_lst_style, #write_a_p_formula, #write_a_p_pr_formula, #write_a_solid_fill, #write_a_srgb_clr, #write_anchor, #write_auto_fill, #write_color, #write_comment_path, #write_def_rpr_r_pr_common, #write_div, #write_fill, #write_font, #write_stroke, #write_tx_pr, #write_xml_declaration, #xl_cell_to_rowcol, #xl_col_to_name, #xl_range, #xl_range_formula, #xl_rowcol_to_cell, #xl_string_pixel_width, #xml_str
Constructor Details
This class inherits a constructor from Writexlsx::Package::ConditionalFormat
Instance Method Details
#write_cf_rule ⇒ Object
829 830 831 832 833 834 |
# File 'lib/write_xlsx/package/conditional_format.rb', line 829 def write_cf_rule @writer.tag_elements('cfRule', attributes) do (@param) if ptrue?(@param[:is_data_bar_2010]) end end |
#write_data_bar ⇒ Object
Write the <dataBar> element.
839 840 841 842 843 844 845 846 847 848 849 |
# File 'lib/write_xlsx/package/conditional_format.rb', line 839 def attributes = [] attributes << ['showValue', 0] if ptrue?() @writer.tag_elements('dataBar', attributes) do write_cfvo(min_type, min_value) write_cfvo(max_type, max_value) write_color('rgb', ) end end |
#write_data_bar_ext(param) ⇒ Object
Write the <extLst> dataBar extension element.
854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 |
# File 'lib/write_xlsx/package/conditional_format.rb', line 854 def (param) # Create a pseudo GUID for each unique Excel 2010 data bar. worksheet_count = @worksheet.index + 1 = @worksheet..size + 1 guid = sprintf( "{DA7ABA51-AAAA-BBBB-%04X-%012X}", worksheet_count, ) # Store the 2010 data bar parameters to write the extLst elements. param[:guid] = guid @worksheet. << param @writer.tag_elements('extLst') do @worksheet.write_ext('{B025F937-C7B1-47D3-B67F-A62EFF666E3E}') do @writer.data_element('x14:id', guid) end end end |