Class: Writexlsx::Chart::Errorbars
- Inherits:
-
Object
- Object
- Writexlsx::Chart::Errorbars
- Includes:
- Utility::ChartFormatting
- Defined in:
- lib/write_xlsx/chart/series.rb
Constant Summary
Constants included from Utility::ChartFormatting
Utility::ChartFormatting::PATTERN_TYPES
Instance Attribute Summary collapse
-
#direction ⇒ Object
readonly
Returns the value of attribute direction.
-
#endcap ⇒ Object
readonly
Returns the value of attribute endcap.
-
#fill ⇒ Object
readonly
Returns the value of attribute fill.
-
#line ⇒ Object
readonly
Returns the value of attribute line.
-
#minus_data ⇒ Object
readonly
Returns the value of attribute minus_data.
-
#minus_values ⇒ Object
readonly
Returns the value of attribute minus_values.
-
#plus_data ⇒ Object
readonly
Returns the value of attribute plus_data.
-
#plus_values ⇒ Object
readonly
Returns the value of attribute plus_values.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(params) ⇒ Errorbars
constructor
A new instance of Errorbars.
Methods included from Utility::ChartFormatting
#color, #dash_types, #fill_properties, #layout_properties, #legend_properties, #line_fill_properties, #line_properties, #palette_color_from_index, #pattern_properties, #value_or_raise, #write_a_solid_fill, #write_a_srgb_clr
Constructor Details
#initialize(params) ⇒ Errorbars
Returns a new instance of Errorbars.
189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 |
# File 'lib/write_xlsx/chart/series.rb', line 189 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 = (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
#direction ⇒ Object (readonly)
Returns the value of attribute direction.
186 187 188 |
# File 'lib/write_xlsx/chart/series.rb', line 186 def direction @direction end |
#endcap ⇒ Object (readonly)
Returns the value of attribute endcap.
186 187 188 |
# File 'lib/write_xlsx/chart/series.rb', line 186 def endcap @endcap end |
#fill ⇒ Object (readonly)
Returns the value of attribute fill.
186 187 188 |
# File 'lib/write_xlsx/chart/series.rb', line 186 def fill @fill end |
#line ⇒ Object (readonly)
Returns the value of attribute line.
186 187 188 |
# File 'lib/write_xlsx/chart/series.rb', line 186 def line @line end |
#minus_data ⇒ Object (readonly)
Returns the value of attribute minus_data.
187 188 189 |
# File 'lib/write_xlsx/chart/series.rb', line 187 def minus_data @minus_data end |
#minus_values ⇒ Object (readonly)
Returns the value of attribute minus_values.
187 188 189 |
# File 'lib/write_xlsx/chart/series.rb', line 187 def minus_values @minus_values end |
#plus_data ⇒ Object (readonly)
Returns the value of attribute plus_data.
187 188 189 |
# File 'lib/write_xlsx/chart/series.rb', line 187 def plus_data @plus_data end |
#plus_values ⇒ Object (readonly)
Returns the value of attribute plus_values.
187 188 189 |
# File 'lib/write_xlsx/chart/series.rb', line 187 def plus_values @plus_values end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
186 187 188 |
# File 'lib/write_xlsx/chart/series.rb', line 186 def type @type end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
186 187 188 |
# File 'lib/write_xlsx/chart/series.rb', line 186 def value @value end |