Class: Writexlsx::InsertedChart
- Inherits:
-
Object
- Object
- Writexlsx::InsertedChart
- Includes:
- Utility
- Defined in:
- lib/write_xlsx/inserted_chart.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 collapse
-
#anchor ⇒ Object
readonly
Returns the value of attribute anchor.
-
#chart ⇒ Object
readonly
Returns the value of attribute chart.
-
#col ⇒ Object
readonly
Returns the value of attribute col.
-
#decorative ⇒ Object
readonly
Returns the value of attribute decorative.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#row ⇒ Object
readonly
Returns the value of attribute row.
-
#x_offset ⇒ Object
readonly
Returns the value of attribute x_offset.
-
#x_scale ⇒ Object
readonly
Returns the value of attribute x_scale.
-
#y_offset ⇒ Object
readonly
Returns the value of attribute y_offset.
-
#y_scale ⇒ Object
readonly
Returns the value of attribute y_scale.
Instance Method Summary collapse
-
#initialize(row, col, chart, x_offset, y_offset, x_scale, y_scale, anchor, description, decorative) ⇒ InsertedChart
constructor
A new instance of InsertedChart.
- #name ⇒ Object
- #scaled_height ⇒ Object
- #scaled_width ⇒ Object
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
#initialize(row, col, chart, x_offset, y_offset, x_scale, y_scale, anchor, description, decorative) ⇒ InsertedChart
Returns a new instance of InsertedChart.
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/write_xlsx/inserted_chart.rb', line 12 def initialize( row, col, chart, x_offset, y_offset, x_scale, y_scale, anchor, description, decorative ) @row = row @col = col @chart = chart @x_offset = x_offset @y_offset = y_offset @x_scale = x_scale || 0 @y_scale = y_scale || 0 @anchor = anchor @description = description @decorative = decorative end |
Instance Attribute Details
#anchor ⇒ Object (readonly)
Returns the value of attribute anchor.
10 11 12 |
# File 'lib/write_xlsx/inserted_chart.rb', line 10 def anchor @anchor end |
#chart ⇒ Object (readonly)
Returns the value of attribute chart.
8 9 10 |
# File 'lib/write_xlsx/inserted_chart.rb', line 8 def chart @chart end |
#col ⇒ Object (readonly)
Returns the value of attribute col.
8 9 10 |
# File 'lib/write_xlsx/inserted_chart.rb', line 8 def col @col end |
#decorative ⇒ Object (readonly)
Returns the value of attribute decorative.
10 11 12 |
# File 'lib/write_xlsx/inserted_chart.rb', line 10 def decorative @decorative end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
10 11 12 |
# File 'lib/write_xlsx/inserted_chart.rb', line 10 def description @description end |
#row ⇒ Object (readonly)
Returns the value of attribute row.
8 9 10 |
# File 'lib/write_xlsx/inserted_chart.rb', line 8 def row @row end |
#x_offset ⇒ Object (readonly)
Returns the value of attribute x_offset.
8 9 10 |
# File 'lib/write_xlsx/inserted_chart.rb', line 8 def x_offset @x_offset end |
#x_scale ⇒ Object (readonly)
Returns the value of attribute x_scale.
9 10 11 |
# File 'lib/write_xlsx/inserted_chart.rb', line 9 def x_scale @x_scale end |
#y_offset ⇒ Object (readonly)
Returns the value of attribute y_offset.
8 9 10 |
# File 'lib/write_xlsx/inserted_chart.rb', line 8 def y_offset @y_offset end |
#y_scale ⇒ Object (readonly)
Returns the value of attribute y_scale.
9 10 11 |
# File 'lib/write_xlsx/inserted_chart.rb', line 9 def y_scale @y_scale end |
Instance Method Details
#name ⇒ Object
28 29 30 |
# File 'lib/write_xlsx/inserted_chart.rb', line 28 def name chart.name end |
#scaled_height ⇒ Object
37 38 39 40 |
# File 'lib/write_xlsx/inserted_chart.rb', line 37 def scaled_height height = chart.height if ptrue?(chart.height) (0.5 + (height * y_scale)).to_i end |
#scaled_width ⇒ Object
32 33 34 35 |
# File 'lib/write_xlsx/inserted_chart.rb', line 32 def scaled_width width = chart.width if ptrue?(chart.width) (0.5 + (width * x_scale)).to_i end |