Class: AsposeCellsCloud::Trendline

Inherits:
Object
  • Object
show all
Defined in:
lib/aspose_cells_cloud/models/trendline.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ Trendline

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash



177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
# File 'lib/aspose_cells_cloud/models/trendline.rb', line 177

def initialize(attributes = {})
  return unless attributes.is_a?(Hash)

  # convert string to symbol for hash key
  attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}

  if attributes.has_key?(:'link')
      self.link = attributes[:'link']
  end
  if attributes.has_key?(:'Backward')
      self.backward = attributes[:'Backward']
  end
  if attributes.has_key?(:'DataLabels')
      self.data_labels = attributes[:'DataLabels']
  end
  if attributes.has_key?(:'DisplayEquation')
      self.display_equation = attributes[:'DisplayEquation']
  end
  if attributes.has_key?(:'DisplayRSquared')
      self.display_r_squared = attributes[:'DisplayRSquared']
  end
  if attributes.has_key?(:'Forward')
      self.forward = attributes[:'Forward']
  end
  if attributes.has_key?(:'Intercept')
      self.intercept = attributes[:'Intercept']
  end
  if attributes.has_key?(:'IsNameAuto')
      self.is_name_auto = attributes[:'IsNameAuto']
  end
  if attributes.has_key?(:'LegendEntry')
      self.legend_entry = attributes[:'LegendEntry']
  end
  if attributes.has_key?(:'Name')
      self.name = attributes[:'Name']
  end
  if attributes.has_key?(:'Order')
      self.order = attributes[:'Order']
  end
  if attributes.has_key?(:'Period')
      self.period = attributes[:'Period']
  end
  if attributes.has_key?(:'Type')
      self.type = attributes[:'Type']
  end
  if attributes.has_key?(:'BeginArrowLength')
      self.begin_arrow_length = attributes[:'BeginArrowLength']
  end
  if attributes.has_key?(:'BeginArrowWidth')
      self.begin_arrow_width = attributes[:'BeginArrowWidth']
  end
  if attributes.has_key?(:'BeginType')
      self.begin_type = attributes[:'BeginType']
  end
  if attributes.has_key?(:'CapType')
      self.cap_type = attributes[:'CapType']
  end
  if attributes.has_key?(:'Color')
      self.color = attributes[:'Color']
  end
  if attributes.has_key?(:'CompoundType')
      self.compound_type = attributes[:'CompoundType']
  end
  if attributes.has_key?(:'DashType')
      self.dash_type = attributes[:'DashType']
  end
  if attributes.has_key?(:'EndArrowLength')
      self.end_arrow_length = attributes[:'EndArrowLength']
  end
  if attributes.has_key?(:'EndArrowWidth')
      self.end_arrow_width = attributes[:'EndArrowWidth']
  end
  if attributes.has_key?(:'EndType')
      self.end_type = attributes[:'EndType']
  end
  if attributes.has_key?(:'GradientFill')
      self.gradient_fill = attributes[:'GradientFill']
  end
  if attributes.has_key?(:'IsAuto')
      self.is_auto = attributes[:'IsAuto']
  end
  if attributes.has_key?(:'IsAutomaticColor')
      self.is_automatic_color = attributes[:'IsAutomaticColor']
  end
  if attributes.has_key?(:'IsVisible')
      self.is_visible = attributes[:'IsVisible']
  end
  if attributes.has_key?(:'JoinType')
      self.join_type = attributes[:'JoinType']
  end
  if attributes.has_key?(:'Style')
      self.style = attributes[:'Style']
  end
  if attributes.has_key?(:'Transparency')
      self.transparency = attributes[:'Transparency']
  end
  if attributes.has_key?(:'Weight')
      self.weight = attributes[:'Weight']
  end
  if attributes.has_key?(:'WeightPt')
      self.weight_pt = attributes[:'WeightPt']
  end

end

Instance Attribute Details

#backwardObject

Returns or sets the number of periods (or units on a scatter chart) that the trendline extends backward. The number of periods must be greater than or equal to zero. If the chart type is column ,the number of periods must be between 0 and 0.5



37
38
39
# File 'lib/aspose_cells_cloud/models/trendline.rb', line 37

def backward
  @backward
end

#begin_arrow_lengthObject

Returns the value of attribute begin_arrow_length.



61
62
63
# File 'lib/aspose_cells_cloud/models/trendline.rb', line 61

def begin_arrow_length
  @begin_arrow_length
end

#begin_arrow_widthObject

Returns the value of attribute begin_arrow_width.



63
64
65
# File 'lib/aspose_cells_cloud/models/trendline.rb', line 63

def begin_arrow_width
  @begin_arrow_width
end

#begin_typeObject

Returns the value of attribute begin_type.



65
66
67
# File 'lib/aspose_cells_cloud/models/trendline.rb', line 65

def begin_type
  @begin_type
end

#cap_typeObject

Returns the value of attribute cap_type.



67
68
69
# File 'lib/aspose_cells_cloud/models/trendline.rb', line 67

def cap_type
  @cap_type
end

#colorObject

Returns the value of attribute color.



69
70
71
# File 'lib/aspose_cells_cloud/models/trendline.rb', line 69

def color
  @color
end

#compound_typeObject

Returns the value of attribute compound_type.



71
72
73
# File 'lib/aspose_cells_cloud/models/trendline.rb', line 71

def compound_type
  @compound_type
end

#dash_typeObject

Returns the value of attribute dash_type.



73
74
75
# File 'lib/aspose_cells_cloud/models/trendline.rb', line 73

def dash_type
  @dash_type
end

#data_labelsObject

Represents the DataLabels object for the specified series.



39
40
41
# File 'lib/aspose_cells_cloud/models/trendline.rb', line 39

def data_labels
  @data_labels
end

#display_equationObject

Represents if the equation for the trendline is displayed on the chart (in the same data label as the R-squared value). Setting this property to True automatically turns on data labels.



41
42
43
# File 'lib/aspose_cells_cloud/models/trendline.rb', line 41

def display_equation
  @display_equation
end

#display_r_squaredObject

Represents if the R-squared value of the trendline is displayed on the chart (in the same data label as the equation). Setting this property to True automatically turns on data labels.



43
44
45
# File 'lib/aspose_cells_cloud/models/trendline.rb', line 43

def display_r_squared
  @display_r_squared
end

#end_arrow_lengthObject

Returns the value of attribute end_arrow_length.



75
76
77
# File 'lib/aspose_cells_cloud/models/trendline.rb', line 75

def end_arrow_length
  @end_arrow_length
end

#end_arrow_widthObject

Returns the value of attribute end_arrow_width.



77
78
79
# File 'lib/aspose_cells_cloud/models/trendline.rb', line 77

def end_arrow_width
  @end_arrow_width
end

#end_typeObject

Returns the value of attribute end_type.



79
80
81
# File 'lib/aspose_cells_cloud/models/trendline.rb', line 79

def end_type
  @end_type
end

#forwardObject

Returns or sets the number of periods (or units on a scatter chart) that the trendline extends forward. The number of periods must be greater than or equal to zero.



45
46
47
# File 'lib/aspose_cells_cloud/models/trendline.rb', line 45

def forward
  @forward
end

#gradient_fillObject

Returns the value of attribute gradient_fill.



81
82
83
# File 'lib/aspose_cells_cloud/models/trendline.rb', line 81

def gradient_fill
  @gradient_fill
end

#interceptObject

Returns or sets the point where the trendline crosses the value axis.



47
48
49
# File 'lib/aspose_cells_cloud/models/trendline.rb', line 47

def intercept
  @intercept
end

#is_autoObject

Returns the value of attribute is_auto.



83
84
85
# File 'lib/aspose_cells_cloud/models/trendline.rb', line 83

def is_auto
  @is_auto
end

#is_automatic_colorObject

Returns the value of attribute is_automatic_color.



85
86
87
# File 'lib/aspose_cells_cloud/models/trendline.rb', line 85

def is_automatic_color
  @is_automatic_color
end

#is_name_autoObject

Returns if Microsoft Excel automatically determines the name of the trendline.



49
50
51
# File 'lib/aspose_cells_cloud/models/trendline.rb', line 49

def is_name_auto
  @is_name_auto
end

#is_visibleObject

Returns the value of attribute is_visible.



87
88
89
# File 'lib/aspose_cells_cloud/models/trendline.rb', line 87

def is_visible
  @is_visible
end

#join_typeObject

Returns the value of attribute join_type.



89
90
91
# File 'lib/aspose_cells_cloud/models/trendline.rb', line 89

def join_type
  @join_type
end

#legend_entryObject

Gets the legend entry according to this trendline



51
52
53
# File 'lib/aspose_cells_cloud/models/trendline.rb', line 51

def legend_entry
  @legend_entry
end

Returns the value of attribute link.



35
36
37
# File 'lib/aspose_cells_cloud/models/trendline.rb', line 35

def link
  @link
end

#nameObject

Returns the name of the trendline.



53
54
55
# File 'lib/aspose_cells_cloud/models/trendline.rb', line 53

def name
  @name
end

#orderObject

Returns or sets the trendline order (an integer greater than 1) when the trendline type is Polynomial. The order must be between 2 and 6.



55
56
57
# File 'lib/aspose_cells_cloud/models/trendline.rb', line 55

def order
  @order
end

#periodObject

Returns or sets the period for the moving-average trendline.



57
58
59
# File 'lib/aspose_cells_cloud/models/trendline.rb', line 57

def period
  @period
end

#styleObject

Returns the value of attribute style.



91
92
93
# File 'lib/aspose_cells_cloud/models/trendline.rb', line 91

def style
  @style
end

#transparencyObject

Returns the value of attribute transparency.



93
94
95
# File 'lib/aspose_cells_cloud/models/trendline.rb', line 93

def transparency
  @transparency
end

#typeObject

Returns the trendline type.



59
60
61
# File 'lib/aspose_cells_cloud/models/trendline.rb', line 59

def type
  @type
end

#weightObject

Returns the value of attribute weight.



95
96
97
# File 'lib/aspose_cells_cloud/models/trendline.rb', line 95

def weight
  @weight
end

#weight_ptObject

Returns the value of attribute weight_pt.



97
98
99
# File 'lib/aspose_cells_cloud/models/trendline.rb', line 97

def weight_pt
  @weight_pt
end

Class Method Details

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
# File 'lib/aspose_cells_cloud/models/trendline.rb', line 100

def self.attribute_map
  {
    :'link' => :'link',
    :'backward' => :'Backward',
    :'data_labels' => :'DataLabels',
    :'display_equation' => :'DisplayEquation',
    :'display_r_squared' => :'DisplayRSquared',
    :'forward' => :'Forward',
    :'intercept' => :'Intercept',
    :'is_name_auto' => :'IsNameAuto',
    :'legend_entry' => :'LegendEntry',
    :'name' => :'Name',
    :'order' => :'Order',
    :'period' => :'Period',
    :'type' => :'Type',
    :'begin_arrow_length' => :'BeginArrowLength',
    :'begin_arrow_width' => :'BeginArrowWidth',
    :'begin_type' => :'BeginType',
    :'cap_type' => :'CapType',
    :'color' => :'Color',
    :'compound_type' => :'CompoundType',
    :'dash_type' => :'DashType',
    :'end_arrow_length' => :'EndArrowLength',
    :'end_arrow_width' => :'EndArrowWidth',
    :'end_type' => :'EndType',
    :'gradient_fill' => :'GradientFill',
    :'is_auto' => :'IsAuto',
    :'is_automatic_color' => :'IsAutomaticColor',
    :'is_visible' => :'IsVisible',
    :'join_type' => :'JoinType',
    :'style' => :'Style',
    :'transparency' => :'Transparency',
    :'weight' => :'Weight',
    :'weight_pt' => :'WeightPt'
  }
end

.swagger_typesObject

Attribute type mapping.



138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
# File 'lib/aspose_cells_cloud/models/trendline.rb', line 138

def self.swagger_types
  {
    :'link' => :'Link',
    :'backward' => :'Float',
    :'data_labels' => :'LinkElement',
    :'display_equation' => :'BOOLEAN',
    :'display_r_squared' => :'BOOLEAN',
    :'forward' => :'Float',
    :'intercept' => :'Float',
    :'is_name_auto' => :'BOOLEAN',
    :'legend_entry' => :'LinkElement',
    :'name' => :'String',
    :'order' => :'Integer',
    :'period' => :'Integer',
    :'type' => :'String',
    :'begin_arrow_length' => :'String',
    :'begin_arrow_width' => :'String',
    :'begin_type' => :'String',
    :'cap_type' => :'String',
    :'color' => :'Color',
    :'compound_type' => :'String',
    :'dash_type' => :'String',
    :'end_arrow_length' => :'String',
    :'end_arrow_width' => :'String',
    :'end_type' => :'String',
    :'gradient_fill' => :'GradientFill',
    :'is_auto' => :'BOOLEAN',
    :'is_automatic_color' => :'BOOLEAN',
    :'is_visible' => :'BOOLEAN',
    :'join_type' => :'String',
    :'style' => :'String',
    :'transparency' => :'Float',
    :'weight' => :'String',
    :'weight_pt' => :'Float'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
# File 'lib/aspose_cells_cloud/models/trendline.rb', line 426

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      link == o.link &&
      backward == o.backward &&
      data_labels == o.data_labels &&
      display_equation == o.display_equation &&
      display_r_squared == o.display_r_squared &&
      forward == o.forward &&
      intercept == o.intercept &&
      is_name_auto == o.is_name_auto &&
      legend_entry == o.legend_entry &&
      name == o.name &&
      order == o.order &&
      period == o.period &&
      type == o.type &&
      begin_arrow_length == o.begin_arrow_length &&
      begin_arrow_width == o.begin_arrow_width &&
      begin_type == o.begin_type &&
      cap_type == o.cap_type &&
      color == o.color &&
      compound_type == o.compound_type &&
      dash_type == o.dash_type &&
      end_arrow_length == o.end_arrow_length &&
      end_arrow_width == o.end_arrow_width &&
      end_type == o.end_type &&
      gradient_fill == o.gradient_fill &&
      is_auto == o.is_auto &&
      is_automatic_color == o.is_automatic_color &&
      is_visible == o.is_visible &&
      join_type == o.join_type &&
      style == o.style &&
      transparency == o.transparency &&
      weight == o.weight &&
      weight_pt == o.weight_pt 
      std_dev == o.std_dev
end

#_deserialize(type, value) ⇒ Object

Deserializes the data based on type

Parameters:

  • string

    type Data type

  • string

    value Value to be deserialized

Returns:

  • (Object)

    Deserialized data



500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
# File 'lib/aspose_cells_cloud/models/trendline.rb', line 500

def _deserialize(type, value)
  case type.to_sym
  when :DateTime
    DateTime.parse(value)
  when :Date
    Date.parse(value)
  when :String
    value.to_s
  when :Integer
    value.to_i
  when :Float
    value.to_f
  when :BOOLEAN
    if value.to_s =~ /\A(true|t|yes|y|1)\z/i
      true
    else
      false
    end
  when :Object
    # generic object (usually a Hash), return directly
    value
  when /\AArray<(?<inner_type>.+)>\z/
    inner_type = Regexp.last_match[:inner_type]
    value.map { |v| _deserialize(inner_type, v) }
  when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
    k_type = Regexp.last_match[:k_type]
    v_type = Regexp.last_match[:v_type]
    {}.tap do |hash|
      value.each do |k, v|
        hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
      end
    end
  else # model
    temp_model = AsposeCellsCloud.const_get(type).new
    temp_model.build_from_hash(value)
  end
end

#_to_hash(value) ⇒ Hash

Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value

Parameters:

  • value (Object)

    Any valid value

Returns:

  • (Hash)

    Returns the value in the form of hash



566
567
568
569
570
571
572
573
574
575
576
577
578
# File 'lib/aspose_cells_cloud/models/trendline.rb', line 566

def _to_hash(value)
  if value.is_a?(Array)
    value.compact.map{ |v| _to_hash(v) }
  elsif value.is_a?(Hash)
    {}.tap do |hash|
      value.each { |k, v| hash[k] = _to_hash(v) }
    end
  elsif value.respond_to? :to_hash
    value.to_hash
  else
    value
  end
end

#build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
# File 'lib/aspose_cells_cloud/models/trendline.rb', line 479

def build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)
  self.class.swagger_types.each_pair do |key, type|
    if type =~ /\AArray<(.*)>/i
      # check to ensure the input is an array given that the the attribute
      # is documented as an array but the input is not
      if attributes[self.class.attribute_map[key]].is_a?(Array)
        self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
      end
    elsif !attributes[self.class.attribute_map[key]].nil?
      self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
    end # or else data not found in attributes(hash), not an issue as the data can be optional
  end

  self
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


466
467
468
# File 'lib/aspose_cells_cloud/models/trendline.rb', line 466

def eql?(o)
  self == o
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



472
473
474
# File 'lib/aspose_cells_cloud/models/trendline.rb', line 472

def hash
  [ link , backward , data_labels , display_equation , display_r_squared , forward , intercept , is_name_auto , legend_entry , name , order , period , type , begin_arrow_length , begin_arrow_width , begin_type , cap_type , color , compound_type , dash_type , end_arrow_length , end_arrow_width , end_type , gradient_fill , is_auto , is_automatic_color , is_visible , join_type , style , transparency , weight , weight_pt ].hash
end

#list_invalid_propertiesObject

Show invalid properties with the reasons. Usually used together with valid?

Returns:

  • Array for valid properies with the reasons



284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
# File 'lib/aspose_cells_cloud/models/trendline.rb', line 284

def list_invalid_properties
  invalid_properties = Array.new
  if @link.nil?
      invalid_properties.push("invalid value for 'link', link cannot be nil.")
  end
  if @backward.nil?
      invalid_properties.push("invalid value for 'backward', backward cannot be nil.")
  end
  if @data_labels.nil?
      invalid_properties.push("invalid value for 'data_labels', data_labels cannot be nil.")
  end
  if @display_equation.nil?
      invalid_properties.push("invalid value for 'display_equation', display_equation cannot be nil.")
  end
  if @display_r_squared.nil?
      invalid_properties.push("invalid value for 'display_r_squared', display_r_squared cannot be nil.")
  end
  if @forward.nil?
      invalid_properties.push("invalid value for 'forward', forward cannot be nil.")
  end
  if @intercept.nil?
      invalid_properties.push("invalid value for 'intercept', intercept cannot be nil.")
  end
  if @is_name_auto.nil?
      invalid_properties.push("invalid value for 'is_name_auto', is_name_auto cannot be nil.")
  end
  if @legend_entry.nil?
      invalid_properties.push("invalid value for 'legend_entry', legend_entry cannot be nil.")
  end
  if @name.nil?
      invalid_properties.push("invalid value for 'name', name cannot be nil.")
  end
  if @order.nil?
      invalid_properties.push("invalid value for 'order', order cannot be nil.")
  end
  if @period.nil?
      invalid_properties.push("invalid value for 'period', period cannot be nil.")
  end
  if @type.nil?
      invalid_properties.push("invalid value for 'type', type cannot be nil.")
  end
  if @begin_arrow_length.nil?
      invalid_properties.push("invalid value for 'begin_arrow_length', begin_arrow_length cannot be nil.")
  end
  if @begin_arrow_width.nil?
      invalid_properties.push("invalid value for 'begin_arrow_width', begin_arrow_width cannot be nil.")
  end
  if @begin_type.nil?
      invalid_properties.push("invalid value for 'begin_type', begin_type cannot be nil.")
  end
  if @cap_type.nil?
      invalid_properties.push("invalid value for 'cap_type', cap_type cannot be nil.")
  end
  if @color.nil?
      invalid_properties.push("invalid value for 'color', color cannot be nil.")
  end
  if @compound_type.nil?
      invalid_properties.push("invalid value for 'compound_type', compound_type cannot be nil.")
  end
  if @dash_type.nil?
      invalid_properties.push("invalid value for 'dash_type', dash_type cannot be nil.")
  end
  if @end_arrow_length.nil?
      invalid_properties.push("invalid value for 'end_arrow_length', end_arrow_length cannot be nil.")
  end
  if @end_arrow_width.nil?
      invalid_properties.push("invalid value for 'end_arrow_width', end_arrow_width cannot be nil.")
  end
  if @end_type.nil?
      invalid_properties.push("invalid value for 'end_type', end_type cannot be nil.")
  end
  if @gradient_fill.nil?
      invalid_properties.push("invalid value for 'gradient_fill', gradient_fill cannot be nil.")
  end
  if @is_auto.nil?
      invalid_properties.push("invalid value for 'is_auto', is_auto cannot be nil.")
  end
  if @is_automatic_color.nil?
      invalid_properties.push("invalid value for 'is_automatic_color', is_automatic_color cannot be nil.")
  end
  if @is_visible.nil?
      invalid_properties.push("invalid value for 'is_visible', is_visible cannot be nil.")
  end
  if @join_type.nil?
      invalid_properties.push("invalid value for 'join_type', join_type cannot be nil.")
  end
  if @style.nil?
      invalid_properties.push("invalid value for 'style', style cannot be nil.")
  end
  if @transparency.nil?
      invalid_properties.push("invalid value for 'transparency', transparency cannot be nil.")
  end
  if @weight.nil?
      invalid_properties.push("invalid value for 'weight', weight cannot be nil.")
  end
  if @weight_pt.nil?
      invalid_properties.push("invalid value for 'weight_pt', weight_pt cannot be nil.")
  end

  return invalid_properties
end

#to_bodyHash

to_body is an alias to to_hash (backward compatibility)

Returns:

  • (Hash)

    Returns the object in the form of hash



546
547
548
# File 'lib/aspose_cells_cloud/models/trendline.rb', line 546

def to_body
  to_hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



552
553
554
555
556
557
558
559
560
# File 'lib/aspose_cells_cloud/models/trendline.rb', line 552

def to_hash
  hash = {}
  self.class.attribute_map.each_pair do |attr, param|
    value = self.send(attr)
    next if value.nil?
    hash[param] = _to_hash(value)
  end
  hash
end

#to_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



540
541
542
# File 'lib/aspose_cells_cloud/models/trendline.rb', line 540

def to_s
  to_hash.to_s
end

#valid?Boolean

Check to see if the all the properties in the model are valid

Returns:

  • (Boolean)

    true if the model is valid



388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
# File 'lib/aspose_cells_cloud/models/trendline.rb', line 388

def valid?
  return false if @link.nil?
  return false if @backward.nil?
  return false if @data_labels.nil?
  return false if @display_equation.nil?
  return false if @display_r_squared.nil?
  return false if @forward.nil?
  return false if @intercept.nil?
  return false if @is_name_auto.nil?
  return false if @legend_entry.nil?
  return false if @name.nil?
  return false if @order.nil?
  return false if @period.nil?
  return false if @type.nil?
  return false if @begin_arrow_length.nil?
  return false if @begin_arrow_width.nil?
  return false if @begin_type.nil?
  return false if @cap_type.nil?
  return false if @color.nil?
  return false if @compound_type.nil?
  return false if @dash_type.nil?
  return false if @end_arrow_length.nil?
  return false if @end_arrow_width.nil?
  return false if @end_type.nil?
  return false if @gradient_fill.nil?
  return false if @is_auto.nil?
  return false if @is_automatic_color.nil?
  return false if @is_visible.nil?
  return false if @join_type.nil?
  return false if @style.nil?
  return false if @transparency.nil?
  return false if @weight.nil?
  return false if @weight_pt.nil?
  return true
end