Class: Writexlsx::Chart::Trendline

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

Constant Summary

Constants included from Utility::ChartFormatting

Utility::ChartFormatting::PATTERN_TYPES

Constants included from Utility::Common

Utility::Common::PERL_TRUE_VALUES

Instance Attribute Summary collapse

Attributes inherited from Chartline

#fill, #gradient, #line, #pattern, #type

Instance Method Summary collapse

Methods inherited from Chartline

#fill_defined?, #line_defined?

Methods included from Gradient

#gradient_properties

Methods included from Utility::RichText

#convert_font_args, #get_font_latin_attributes, #get_font_style_attributes, #params_to_font, #underline_attributes, #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_def_rpr_r_pr_common, #write_tx_pr

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

Methods included from Utility::Common

#absolute_char, #check_parameter, #float_to_str, #ptrue?, #put_deprecate_message

Constructor Details

#initialize(params) ⇒ Trendline

Returns a new instance of Trendline.



71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# File 'lib/write_xlsx/chart/series.rb', line 71

def initialize(params)
  super

  @label = trendline_label_properties(params[:label])

  @name              = params[:name]
  @forward           = params[:forward]
  @backward          = params[:backward]
  @order             = params[:order]
  @period            = params[:period]
  @intercept         = params[:intercept]
  @display_equation  = params[:display_equation]
  @display_r_squared = params[:display_r_squared]
  @type              = value_or_raise(types, params[:type], 'trendline type')
end

Instance Attribute Details

#backwardObject (readonly)

Returns the value of attribute backward.



67
68
69
# File 'lib/write_xlsx/chart/series.rb', line 67

def backward
  @backward
end

#display_equationObject (readonly)

Returns the value of attribute display_equation.



68
69
70
# File 'lib/write_xlsx/chart/series.rb', line 68

def display_equation
  @display_equation
end

#display_r_squaredObject (readonly)

Returns the value of attribute display_r_squared.



68
69
70
# File 'lib/write_xlsx/chart/series.rb', line 68

def display_r_squared
  @display_r_squared
end

#forwardObject (readonly)

Returns the value of attribute forward.



67
68
69
# File 'lib/write_xlsx/chart/series.rb', line 67

def forward
  @forward
end

#interceptObject (readonly)

Returns the value of attribute intercept.



68
69
70
# File 'lib/write_xlsx/chart/series.rb', line 68

def intercept
  @intercept
end

#labelObject (readonly)

Returns the value of attribute label.



69
70
71
# File 'lib/write_xlsx/chart/series.rb', line 69

def label
  @label
end

#nameObject (readonly)

Returns the value of attribute name.



67
68
69
# File 'lib/write_xlsx/chart/series.rb', line 67

def name
  @name
end

#orderObject (readonly)

Returns the value of attribute order.



67
68
69
# File 'lib/write_xlsx/chart/series.rb', line 67

def order
  @order
end

#periodObject (readonly)

Returns the value of attribute period.



67
68
69
# File 'lib/write_xlsx/chart/series.rb', line 67

def period
  @period
end