class AsposeCellsCloud::SparklineGroup

Attributes

display_hidden[RW]

Indicates whether to show data in hidden rows and columns.

first_point_color[RW]

Gets and sets the color of the first point of data in the sparkline group.

high_point_color[RW]

Gets and sets the color of the highest points of data in the sparkline group.

horizontal_axis_color[RW]

Gets and sets the color of the horizontal axis in the sparkline group.

horizontal_axis_date_range[RW]

Represents the range that contains the date values for the sparkline data.

last_point_color[RW]

Gets and sets the color of the last point of data in the sparkline group.

line_weight[RW]

Gets and sets the line weight in each line sparkline in the sparkline group, in the unit of points.

low_point_color[RW]

Gets and sets the color of the lowest points of data in the sparkline group.

markers_color[RW]

Gets and sets the color of points in each line sparkline in the sparkline group.

negative_points_color[RW]

Gets and sets the color of the negative values on the sparkline group.

plot_empty_cells_type[RW]

Indicates how to plot empty cells.

plot_right_to_left[RW]

Indicates whether the plot data is right to left.

preset_style[RW]

Gets and sets the preset style type of the sparkline group.

series_color[RW]

Gets and sets the color of the sparklines in the sparkline group.

show_first_point[RW]

Indicates whether to highlight the first point of data in the sparkline group.

show_high_point[RW]

Indicates whether to highlight the highest points of data in the sparkline group.

show_horizontal_axis[RW]

Indicates whether to show the sparkline horizontal axis. The horizontal axis appears if the sparkline has data that crosses the zero axis.

show_last_point[RW]

Indicates whether to highlight the last point of data in the sparkline group.

show_low_point[RW]

Indicates whether to highlight the lowest points of data in the sparkline group.

show_markers[RW]

Indicates whether to highlight each point in each line sparkline in the sparkline group.

show_negative_points[RW]

Indicates whether to highlight the negative values on the sparkline group with a different color or marker.

sparkline_collection[RW]

Gets the collection of object.

type[RW]

Indicates the sparkline type of the sparkline group.

vertical_axis_max_value[RW]

Gets and sets the custom maximum value for the vertical axis.

vertical_axis_max_value_type[RW]

Represents the vertical axis maximum value type.

vertical_axis_min_value[RW]

Gets and sets the custom minimum value for the vertical axis.

vertical_axis_min_value_type[RW]

Represents the vertical axis minimum value type.

Public Class Methods

attribute_map() click to toggle source

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

# File lib/aspose_cells_cloud/models/sparkline_group.rb, line 90
def self.attribute_map
  {
    :'display_hidden' => :'DisplayHidden',
    :'first_point_color' => :'FirstPointColor',
    :'high_point_color' => :'HighPointColor',
    :'horizontal_axis_color' => :'HorizontalAxisColor',
    :'horizontal_axis_date_range' => :'HorizontalAxisDateRange',
    :'last_point_color' => :'LastPointColor',
    :'line_weight' => :'LineWeight',
    :'low_point_color' => :'LowPointColor',
    :'markers_color' => :'MarkersColor',
    :'negative_points_color' => :'NegativePointsColor',
    :'plot_empty_cells_type' => :'PlotEmptyCellsType',
    :'plot_right_to_left' => :'PlotRightToLeft',
    :'preset_style' => :'PresetStyle',
    :'series_color' => :'SeriesColor',
    :'show_first_point' => :'ShowFirstPoint',
    :'show_high_point' => :'ShowHighPoint',
    :'show_horizontal_axis' => :'ShowHorizontalAxis',
    :'show_last_point' => :'ShowLastPoint',
    :'show_low_point' => :'ShowLowPoint',
    :'show_markers' => :'ShowMarkers',
    :'show_negative_points' => :'ShowNegativePoints',
    :'sparkline_collection' => :'SparklineCollection',
    :'type' => :'Type',
    :'vertical_axis_max_value' => :'VerticalAxisMaxValue',
    :'vertical_axis_max_value_type' => :'VerticalAxisMaxValueType',
    :'vertical_axis_min_value' => :'VerticalAxisMinValue',
    :'vertical_axis_min_value_type' => :'VerticalAxisMinValueType'
  }
end
new(attributes = {}) click to toggle source

Initializes the object @param [Hash] attributes Model attributes in the form of hash

# File lib/aspose_cells_cloud/models/sparkline_group.rb, line 157
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?(:'DisplayHidden')
      self.display_hidden = attributes[:'DisplayHidden']
  end
  if attributes.has_key?(:'FirstPointColor')
      self.first_point_color = attributes[:'FirstPointColor']
  end
  if attributes.has_key?(:'HighPointColor')
      self.high_point_color = attributes[:'HighPointColor']
  end
  if attributes.has_key?(:'HorizontalAxisColor')
      self.horizontal_axis_color = attributes[:'HorizontalAxisColor']
  end
  if attributes.has_key?(:'HorizontalAxisDateRange')
      self.horizontal_axis_date_range = attributes[:'HorizontalAxisDateRange']
  end
  if attributes.has_key?(:'LastPointColor')
      self.last_point_color = attributes[:'LastPointColor']
  end
  if attributes.has_key?(:'LineWeight')
      self.line_weight = attributes[:'LineWeight']
  end
  if attributes.has_key?(:'LowPointColor')
      self.low_point_color = attributes[:'LowPointColor']
  end
  if attributes.has_key?(:'MarkersColor')
      self.markers_color = attributes[:'MarkersColor']
  end
  if attributes.has_key?(:'NegativePointsColor')
      self.negative_points_color = attributes[:'NegativePointsColor']
  end
  if attributes.has_key?(:'PlotEmptyCellsType')
      self.plot_empty_cells_type = attributes[:'PlotEmptyCellsType']
  end
  if attributes.has_key?(:'PlotRightToLeft')
      self.plot_right_to_left = attributes[:'PlotRightToLeft']
  end
  if attributes.has_key?(:'PresetStyle')
      self.preset_style = attributes[:'PresetStyle']
  end
  if attributes.has_key?(:'SeriesColor')
      self.series_color = attributes[:'SeriesColor']
  end
  if attributes.has_key?(:'ShowFirstPoint')
      self.show_first_point = attributes[:'ShowFirstPoint']
  end
  if attributes.has_key?(:'ShowHighPoint')
      self.show_high_point = attributes[:'ShowHighPoint']
  end
  if attributes.has_key?(:'ShowHorizontalAxis')
      self.show_horizontal_axis = attributes[:'ShowHorizontalAxis']
  end
  if attributes.has_key?(:'ShowLastPoint')
      self.show_last_point = attributes[:'ShowLastPoint']
  end
  if attributes.has_key?(:'ShowLowPoint')
      self.show_low_point = attributes[:'ShowLowPoint']
  end
  if attributes.has_key?(:'ShowMarkers')
      self.show_markers = attributes[:'ShowMarkers']
  end
  if attributes.has_key?(:'ShowNegativePoints')
      self.show_negative_points = attributes[:'ShowNegativePoints']
  end
  if attributes.has_key?(:'SparklineCollection')
      self.sparkline_collection = attributes[:'SparklineCollection']
  end
  if attributes.has_key?(:'Type')
      self.type = attributes[:'Type']
  end
  if attributes.has_key?(:'VerticalAxisMaxValue')
      self.vertical_axis_max_value = attributes[:'VerticalAxisMaxValue']
  end
  if attributes.has_key?(:'VerticalAxisMaxValueType')
      self.vertical_axis_max_value_type = attributes[:'VerticalAxisMaxValueType']
  end
  if attributes.has_key?(:'VerticalAxisMinValue')
      self.vertical_axis_min_value = attributes[:'VerticalAxisMinValue']
  end
  if attributes.has_key?(:'VerticalAxisMinValueType')
      self.vertical_axis_min_value_type = attributes[:'VerticalAxisMinValueType']
  end

end
swagger_types() click to toggle source

Attribute type mapping.

# File lib/aspose_cells_cloud/models/sparkline_group.rb, line 123
def self.swagger_types
  {
    :'display_hidden' => :'BOOLEAN',
    :'first_point_color' => :'CellsColor',
    :'high_point_color' => :'CellsColor',
    :'horizontal_axis_color' => :'CellsColor',
    :'horizontal_axis_date_range' => :'String',
    :'last_point_color' => :'CellsColor',
    :'line_weight' => :'Float',
    :'low_point_color' => :'CellsColor',
    :'markers_color' => :'CellsColor',
    :'negative_points_color' => :'CellsColor',
    :'plot_empty_cells_type' => :'String',
    :'plot_right_to_left' => :'BOOLEAN',
    :'preset_style' => :'String',
    :'series_color' => :'CellsColor',
    :'show_first_point' => :'BOOLEAN',
    :'show_high_point' => :'BOOLEAN',
    :'show_horizontal_axis' => :'BOOLEAN',
    :'show_last_point' => :'BOOLEAN',
    :'show_low_point' => :'BOOLEAN',
    :'show_markers' => :'BOOLEAN',
    :'show_negative_points' => :'BOOLEAN',
    :'sparkline_collection' => :'Array<Sparkline>',
    :'type' => :'String',
    :'vertical_axis_max_value' => :'Float',
    :'vertical_axis_max_value_type' => :'String',
    :'vertical_axis_min_value' => :'Float',
    :'vertical_axis_min_value_type' => :'String'
  }
end

Public Instance Methods

==(o) click to toggle source

Checks equality by comparing each attribute. @param [Object] Object to be compared

# File lib/aspose_cells_cloud/models/sparkline_group.rb, line 371
def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      display_hidden == o.display_hidden &&
      first_point_color == o.first_point_color &&
      high_point_color == o.high_point_color &&
      horizontal_axis_color == o.horizontal_axis_color &&
      horizontal_axis_date_range == o.horizontal_axis_date_range &&
      last_point_color == o.last_point_color &&
      line_weight == o.line_weight &&
      low_point_color == o.low_point_color &&
      markers_color == o.markers_color &&
      negative_points_color == o.negative_points_color &&
      plot_empty_cells_type == o.plot_empty_cells_type &&
      plot_right_to_left == o.plot_right_to_left &&
      preset_style == o.preset_style &&
      series_color == o.series_color &&
      show_first_point == o.show_first_point &&
      show_high_point == o.show_high_point &&
      show_horizontal_axis == o.show_horizontal_axis &&
      show_last_point == o.show_last_point &&
      show_low_point == o.show_low_point &&
      show_markers == o.show_markers &&
      show_negative_points == o.show_negative_points &&
      sparkline_collection == o.sparkline_collection &&
      type == o.type &&
      vertical_axis_max_value == o.vertical_axis_max_value &&
      vertical_axis_max_value_type == o.vertical_axis_max_value_type &&
      vertical_axis_min_value == o.vertical_axis_min_value &&
      vertical_axis_min_value_type == o.vertical_axis_min_value_type 
      std_dev == o.std_dev
end
_deserialize(type, value) click to toggle source

Deserializes the data based on type @param string type Data type @param string value Value to be deserialized @return [Object] Deserialized data

# File lib/aspose_cells_cloud/models/sparkline_group.rb, line 440
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) click to toggle source

Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value @param [Object] value Any valid value @return [Hash] Returns the value in the form of hash

# File lib/aspose_cells_cloud/models/sparkline_group.rb, line 506
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) click to toggle source

Builds the object from hash @param [Hash] attributes Model attributes in the form of hash @return [Object] Returns the model itself

# File lib/aspose_cells_cloud/models/sparkline_group.rb, line 419
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) click to toggle source

@see the ‘==` method @param [Object] Object to be compared

# File lib/aspose_cells_cloud/models/sparkline_group.rb, line 406
def eql?(o)
  self == o
end
hash() click to toggle source

Calculates hash code according to all attributes. @return [Fixnum] Hash code

# File lib/aspose_cells_cloud/models/sparkline_group.rb, line 412
def hash
  [ display_hidden , first_point_color , high_point_color , horizontal_axis_color , horizontal_axis_date_range , last_point_color , line_weight , low_point_color , markers_color , negative_points_color , plot_empty_cells_type , plot_right_to_left , preset_style , series_color , show_first_point , show_high_point , show_horizontal_axis , show_last_point , show_low_point , show_markers , show_negative_points , sparkline_collection , type , vertical_axis_max_value , vertical_axis_max_value_type , vertical_axis_min_value , vertical_axis_min_value_type ].hash
end
list_invalid_properties() click to toggle source

Show invalid properties with the reasons. Usually used together with valid? @return Array for valid properies with the reasons

# File lib/aspose_cells_cloud/models/sparkline_group.rb, line 249
def list_invalid_properties
  invalid_properties = Array.new
  if @display_hidden.nil?
      invalid_properties.push("invalid value for 'display_hidden', display_hidden cannot be nil.")
  end
  if @first_point_color.nil?
      invalid_properties.push("invalid value for 'first_point_color', first_point_color cannot be nil.")
  end
  if @high_point_color.nil?
      invalid_properties.push("invalid value for 'high_point_color', high_point_color cannot be nil.")
  end
  if @horizontal_axis_color.nil?
      invalid_properties.push("invalid value for 'horizontal_axis_color', horizontal_axis_color cannot be nil.")
  end
  if @horizontal_axis_date_range.nil?
      invalid_properties.push("invalid value for 'horizontal_axis_date_range', horizontal_axis_date_range cannot be nil.")
  end
  if @last_point_color.nil?
      invalid_properties.push("invalid value for 'last_point_color', last_point_color cannot be nil.")
  end
  if @line_weight.nil?
      invalid_properties.push("invalid value for 'line_weight', line_weight cannot be nil.")
  end
  if @low_point_color.nil?
      invalid_properties.push("invalid value for 'low_point_color', low_point_color cannot be nil.")
  end
  if @markers_color.nil?
      invalid_properties.push("invalid value for 'markers_color', markers_color cannot be nil.")
  end
  if @negative_points_color.nil?
      invalid_properties.push("invalid value for 'negative_points_color', negative_points_color cannot be nil.")
  end
  if @plot_empty_cells_type.nil?
      invalid_properties.push("invalid value for 'plot_empty_cells_type', plot_empty_cells_type cannot be nil.")
  end
  if @plot_right_to_left.nil?
      invalid_properties.push("invalid value for 'plot_right_to_left', plot_right_to_left cannot be nil.")
  end
  if @preset_style.nil?
      invalid_properties.push("invalid value for 'preset_style', preset_style cannot be nil.")
  end
  if @series_color.nil?
      invalid_properties.push("invalid value for 'series_color', series_color cannot be nil.")
  end
  if @show_first_point.nil?
      invalid_properties.push("invalid value for 'show_first_point', show_first_point cannot be nil.")
  end
  if @show_high_point.nil?
      invalid_properties.push("invalid value for 'show_high_point', show_high_point cannot be nil.")
  end
  if @show_horizontal_axis.nil?
      invalid_properties.push("invalid value for 'show_horizontal_axis', show_horizontal_axis cannot be nil.")
  end
  if @show_last_point.nil?
      invalid_properties.push("invalid value for 'show_last_point', show_last_point cannot be nil.")
  end
  if @show_low_point.nil?
      invalid_properties.push("invalid value for 'show_low_point', show_low_point cannot be nil.")
  end
  if @show_markers.nil?
      invalid_properties.push("invalid value for 'show_markers', show_markers cannot be nil.")
  end
  if @show_negative_points.nil?
      invalid_properties.push("invalid value for 'show_negative_points', show_negative_points cannot be nil.")
  end
  if @sparkline_collection.nil?
      invalid_properties.push("invalid value for 'sparkline_collection', sparkline_collection cannot be nil.")
  end
  if @type.nil?
      invalid_properties.push("invalid value for 'type', type cannot be nil.")
  end
  if @vertical_axis_max_value.nil?
      invalid_properties.push("invalid value for 'vertical_axis_max_value', vertical_axis_max_value cannot be nil.")
  end
  if @vertical_axis_max_value_type.nil?
      invalid_properties.push("invalid value for 'vertical_axis_max_value_type', vertical_axis_max_value_type cannot be nil.")
  end
  if @vertical_axis_min_value.nil?
      invalid_properties.push("invalid value for 'vertical_axis_min_value', vertical_axis_min_value cannot be nil.")
  end
  if @vertical_axis_min_value_type.nil?
      invalid_properties.push("invalid value for 'vertical_axis_min_value_type', vertical_axis_min_value_type cannot be nil.")
  end

  return invalid_properties
end
to_body() click to toggle source

to_body is an alias to to_hash (backward compatibility) @return [Hash] Returns the object in the form of hash

# File lib/aspose_cells_cloud/models/sparkline_group.rb, line 486
def to_body
  to_hash
end
to_hash() click to toggle source

Returns the object in the form of hash @return [Hash] Returns the object in the form of hash

# File lib/aspose_cells_cloud/models/sparkline_group.rb, line 492
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_s() click to toggle source

Returns the string representation of the object @return [String] String presentation of the object

# File lib/aspose_cells_cloud/models/sparkline_group.rb, line 480
def to_s
  to_hash.to_s
end
valid?() click to toggle source

Check to see if the all the properties in the model are valid @return true if the model is valid

# File lib/aspose_cells_cloud/models/sparkline_group.rb, line 338
def valid?
  return false if @display_hidden.nil?
  return false if @first_point_color.nil?
  return false if @high_point_color.nil?
  return false if @horizontal_axis_color.nil?
  return false if @horizontal_axis_date_range.nil?
  return false if @last_point_color.nil?
  return false if @line_weight.nil?
  return false if @low_point_color.nil?
  return false if @markers_color.nil?
  return false if @negative_points_color.nil?
  return false if @plot_empty_cells_type.nil?
  return false if @plot_right_to_left.nil?
  return false if @preset_style.nil?
  return false if @series_color.nil?
  return false if @show_first_point.nil?
  return false if @show_high_point.nil?
  return false if @show_horizontal_axis.nil?
  return false if @show_last_point.nil?
  return false if @show_low_point.nil?
  return false if @show_markers.nil?
  return false if @show_negative_points.nil?
  return false if @sparkline_collection.nil?
  return false if @type.nil?
  return false if @vertical_axis_max_value.nil?
  return false if @vertical_axis_max_value_type.nil?
  return false if @vertical_axis_min_value.nil?
  return false if @vertical_axis_min_value_type.nil?
  return true
end