Class: AsposeSlidesCloud::OneValueChartDataPoint

Inherits:
DataPoint show all
Defined in:
lib/aspose_slides_cloud/models/one_value_chart_data_point.rb

Overview

One value chart data point.

Instance Attribute Summary collapse

Attributes inherited from DataPoint

#effect_format, #fill_format, #line_format, #marker, #three_d_format, #type

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseObject

#_deserialize, #_to_hash, #build_from_hash, #to_body, #to_hash, #to_s

Constructor Details

#initialize(attributes = {}) ⇒ OneValueChartDataPoint

Initializes the object

Parameters:

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

    Model attributes in the form of hash



62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# File 'lib/aspose_slides_cloud/models/one_value_chart_data_point.rb', line 62

def initialize(attributes = {})
  super

  if attributes.has_key?(:'Value')
    self.value = attributes[:'Value']
  end

  if attributes.has_key?(:'ValueFormula')
    self.value_formula = attributes[:'ValueFormula']
  end

  if attributes.has_key?(:'SetAsTotal')
    self.set_as_total = attributes[:'SetAsTotal']
  end

  if attributes.has_key?(:'InvertIfNegative')
    self.invert_if_negative = attributes[:'InvertIfNegative']
  end
  self.type = 'OneValue'
end

Instance Attribute Details

#invert_if_negativeObject

True if the data point shall invert its colors if the value is negative. Applies to bar, column and bubble series.



38
39
40
# File 'lib/aspose_slides_cloud/models/one_value_chart_data_point.rb', line 38

def invert_if_negative
  @invert_if_negative
end

#set_as_totalObject

SetAsTotal. Applied to Waterfall data points only.



35
36
37
# File 'lib/aspose_slides_cloud/models/one_value_chart_data_point.rb', line 35

def set_as_total
  @set_as_total
end

#valueObject

Value.



29
30
31
# File 'lib/aspose_slides_cloud/models/one_value_chart_data_point.rb', line 29

def value
  @value
end

#value_formulaObject

Spreadsheet formula in A1-style.



32
33
34
# File 'lib/aspose_slides_cloud/models/one_value_chart_data_point.rb', line 32

def value_formula
  @value_formula
end

Class Method Details

.attribute_mapObject

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



41
42
43
44
45
46
47
48
# File 'lib/aspose_slides_cloud/models/one_value_chart_data_point.rb', line 41

def self.attribute_map
  super.merge({
    :'value' => :'Value',
    :'value_formula' => :'ValueFormula',
    :'set_as_total' => :'SetAsTotal',
    :'invert_if_negative' => :'InvertIfNegative',
  })
end

.swagger_typesObject

Attribute type mapping.



51
52
53
54
55
56
57
58
# File 'lib/aspose_slides_cloud/models/one_value_chart_data_point.rb', line 51

def self.swagger_types
  super.merge({
    :'value' => :'Float',
    :'value_formula' => :'String',
    :'set_as_total' => :'BOOLEAN',
    :'invert_if_negative' => :'BOOLEAN',
  })
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



99
100
101
102
103
104
105
106
107
108
109
110
111
112
# File 'lib/aspose_slides_cloud/models/one_value_chart_data_point.rb', line 99

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      fill_format == o.fill_format &&
      effect_format == o.effect_format &&
      three_d_format == o.three_d_format &&
      line_format == o.line_format &&
      marker == o.marker &&
      type == o.type &&
      value == o.value &&
      value_formula == o.value_formula &&
      set_as_total == o.set_as_total &&
      invert_if_negative == o.invert_if_negative
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


116
117
118
# File 'lib/aspose_slides_cloud/models/one_value_chart_data_point.rb', line 116

def eql?(o)
  self == o
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



122
123
124
# File 'lib/aspose_slides_cloud/models/one_value_chart_data_point.rb', line 122

def hash
  [fill_format, effect_format, three_d_format, line_format, marker, type, value, value_formula, set_as_total, invert_if_negative].hash
end

#list_invalid_propertiesObject

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

Returns:

  • Array for valid properties with the reasons



85
86
87
88
# File 'lib/aspose_slides_cloud/models/one_value_chart_data_point.rb', line 85

def list_invalid_properties
  invalid_properties = super
  invalid_properties
end

#valid?Boolean

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

Returns:

  • (Boolean)

    true if the model is valid



92
93
94
95
# File 'lib/aspose_slides_cloud/models/one_value_chart_data_point.rb', line 92

def valid?
  return false if !super
  true
end