Class: Writexlsx::Chart::Errorbars

Inherits:
Object
  • Object
show all
Includes:
Utility
Defined in:
lib/write_xlsx/chart/series.rb

Constant Summary

Constants included from Utility

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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, #process_workbook_options, #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_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

#initialize(params) ⇒ Errorbars


125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
# File 'lib/write_xlsx/chart/series.rb', line 125

def initialize(params)
  @type = types[params[:type].to_sym] || 'fixedVal'
  @value = params[:value] || 1    # value for error types that require it.
  @endcap = params[:end_style] || 1 # end-cap style.

  # Set the error bar direction.
  @direction = error_bar_direction(params[:direction])

  # Set any custom values
  @plus_values  = params[:plus_values]  || [1]
  @minus_values = params[:minus_values] || [1]
  @plus_data    = params[:plus_data]    || []
  @minus_data   = params[:minus_data]   || []

  # Set the line properties for the error bars.
  @line = line_properties(params[:line])
  @fill = params[:fill]
end

Instance Attribute Details

#directionObject (readonly)

Returns the value of attribute direction


122
123
124
# File 'lib/write_xlsx/chart/series.rb', line 122

def direction
  @direction
end

#endcapObject (readonly)

Returns the value of attribute endcap


122
123
124
# File 'lib/write_xlsx/chart/series.rb', line 122

def endcap
  @endcap
end

#fillObject (readonly)

Returns the value of attribute fill


122
123
124
# File 'lib/write_xlsx/chart/series.rb', line 122

def fill
  @fill
end

#lineObject (readonly)

Returns the value of attribute line


122
123
124
# File 'lib/write_xlsx/chart/series.rb', line 122

def line
  @line
end

#minus_dataObject (readonly)

Returns the value of attribute minus_data


123
124
125
# File 'lib/write_xlsx/chart/series.rb', line 123

def minus_data
  @minus_data
end

#minus_valuesObject (readonly)

Returns the value of attribute minus_values


123
124
125
# File 'lib/write_xlsx/chart/series.rb', line 123

def minus_values
  @minus_values
end

#plus_dataObject (readonly)

Returns the value of attribute plus_data


123
124
125
# File 'lib/write_xlsx/chart/series.rb', line 123

def plus_data
  @plus_data
end

#plus_valuesObject (readonly)

Returns the value of attribute plus_values


123
124
125
# File 'lib/write_xlsx/chart/series.rb', line 123

def plus_values
  @plus_values
end

#typeObject (readonly)

Returns the value of attribute type


122
123
124
# File 'lib/write_xlsx/chart/series.rb', line 122

def type
  @type
end

#valueObject (readonly)

Returns the value of attribute value


122
123
124
# File 'lib/write_xlsx/chart/series.rb', line 122

def value
  @value
end