Class: DatadogAPIClient::V1::WidgetAxis

Inherits:
Object
  • Object
show all
Defined in:
lib/datadog_api_client/v1/models/widget_axis.rb

Overview

Axis controls for the widget.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ WidgetAxis

Initializes the object

Parameters:

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

    attributes Model attributes in the form of hash



80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
# File 'lib/datadog_api_client/v1/models/widget_axis.rb', line 80

def initialize(attributes = {})
  if (!attributes.is_a?(Hash))
    fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::WidgetAxis` initialize method"
  end

  # check to see if the attribute exists and convert string to symbol for hash key
  attributes = attributes.each_with_object({}) { |(k, v), h|
    if (!self.class.attribute_map.key?(k.to_sym))
      fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::WidgetAxis`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
    end
    h[k.to_sym] = v
  }

  if attributes.key?(:'include_zero')
    self.include_zero = attributes[:'include_zero']
  end

  if attributes.key?(:'label')
    self.label = attributes[:'label']
  end

  if attributes.key?(:'max')
    self.max = attributes[:'max']
  else
    self.max = 'auto'
  end

  if attributes.key?(:'min')
    self.min = attributes[:'min']
  else
    self.min = 'auto'
  end

  if attributes.key?(:'scale')
    self.scale = attributes[:'scale']
  else
    self.scale = 'linear'
  end
end

Instance Attribute Details

#include_zeroObject

True includes zero.



27
28
29
# File 'lib/datadog_api_client/v1/models/widget_axis.rb', line 27

def include_zero
  @include_zero
end

#labelObject

The label of the axis to display on the graph.



30
31
32
# File 'lib/datadog_api_client/v1/models/widget_axis.rb', line 30

def label
  @label
end

#maxObject

Specifies the maximum value to show on the y-axis. It takes a number, or auto for default behavior.



33
34
35
# File 'lib/datadog_api_client/v1/models/widget_axis.rb', line 33

def max
  @max
end

#minObject

Specifies minimum value to show on the y-axis. It takes a number, or auto for default behavior.



36
37
38
# File 'lib/datadog_api_client/v1/models/widget_axis.rb', line 36

def min
  @min
end

#scaleObject

Specifies the scale type. Possible values are ‘linear`, `log`, `sqrt`, `pow##` (for example `pow2`, `pow0.5` etc.).



39
40
41
# File 'lib/datadog_api_client/v1/models/widget_axis.rb', line 39

def scale
  @scale
end