Class: AsposeSlidesCloud::ChartSeriesGroup

Inherits:
Object
  • Object
show all
Defined in:
lib/aspose_slides_cloud/models/chart_series_group.rb

Overview

Chart series group. Defines common properties for a group of series.

Defined Under Namespace

Classes: EnumAttributeValidator

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ ChartSeriesGroup

Initializes the object

Parameters:

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

    Model attributes in the form of hash



134
135
136
137
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
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
# File 'lib/aspose_slides_cloud/models/chart_series_group.rb', line 134

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?(:'Type')
    self.type = attributes[:'Type']
  end

  if attributes.has_key?(:'GapWidth')
    self.gap_width = attributes[:'GapWidth']
  end

  if attributes.has_key?(:'GapDepth')
    self.gap_depth = attributes[:'GapDepth']
  end

  if attributes.has_key?(:'FirstSliceAngle')
    self.first_slice_angle = attributes[:'FirstSliceAngle']
  end

  if attributes.has_key?(:'IsColorVaried')
    self.is_color_varied = attributes[:'IsColorVaried']
  end

  if attributes.has_key?(:'HasSeriesLines')
    self.has_series_lines = attributes[:'HasSeriesLines']
  end

  if attributes.has_key?(:'Overlap')
    self.overlap = attributes[:'Overlap']
  end

  if attributes.has_key?(:'SecondPieSize')
    self.second_pie_size = attributes[:'SecondPieSize']
  end

  if attributes.has_key?(:'PieSplitPosition')
    self.pie_split_position = attributes[:'PieSplitPosition']
  end

  if attributes.has_key?(:'PieSplitBy')
    self.pie_split_by = attributes[:'PieSplitBy']
  end

  if attributes.has_key?(:'DoughnutHoleSize')
    self.doughnut_hole_size = attributes[:'DoughnutHoleSize']
  end

  if attributes.has_key?(:'BubbleSizeScale')
    self.bubble_size_scale = attributes[:'BubbleSizeScale']
  end

  if attributes.has_key?(:'HiLowLinesFormat')
    self.hi_low_lines_format = attributes[:'HiLowLinesFormat']
  end

  if attributes.has_key?(:'BubbleSizeRepresentation')
    self.bubble_size_representation = attributes[:'BubbleSizeRepresentation']
  end
end

Instance Attribute Details

#bubble_size_representationObject

Specifies how the bubble size values are represented on the bubble chart. Read/write BubbleSizeRepresentationType.



68
69
70
# File 'lib/aspose_slides_cloud/models/chart_series_group.rb', line 68

def bubble_size_representation
  @bubble_size_representation
end

#bubble_size_scaleObject

Specifies the scale factor for the bubble chart (can be between 0 and 300 percents of the default size). Read/write Int32.



62
63
64
# File 'lib/aspose_slides_cloud/models/chart_series_group.rb', line 62

def bubble_size_scale
  @bubble_size_scale
end

#doughnut_hole_sizeObject

Specifies the size of the hole in a doughnut chart (can be between 10 and 90 percents of the size of the plot area.).



59
60
61
# File 'lib/aspose_slides_cloud/models/chart_series_group.rb', line 59

def doughnut_hole_size
  @doughnut_hole_size
end

#first_slice_angleObject

Gets or sets the angle of the first pie or doughnut chart slice, in degrees (clockwise from up, from 0 to 360 degrees).



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

def first_slice_angle
  @first_slice_angle
end

#gap_depthObject

Returns or sets the distance, as a percentage of the marker width, between the data series in a 3D chart.



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

def gap_depth
  @gap_depth
end

#gap_widthObject

Specifies the space between bar or column clusters, as a percentage of the bar or column width.



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

def gap_width
  @gap_width
end

#has_series_linesObject

True if chart has series lines. Applied to stacked bar and OfPie charts.



44
45
46
# File 'lib/aspose_slides_cloud/models/chart_series_group.rb', line 44

def has_series_lines
  @has_series_lines
end

#hi_low_lines_formatObject

Specifies HiLowLines format. HiLowLines applied with HiLowClose, OpenHiLowClose, VolumeHiLowClose and VolumeOpenHiLowClose chart types.



65
66
67
# File 'lib/aspose_slides_cloud/models/chart_series_group.rb', line 65

def hi_low_lines_format
  @hi_low_lines_format
end

#is_color_variedObject

Specifies that each data marker in the series has a different color.



41
42
43
# File 'lib/aspose_slides_cloud/models/chart_series_group.rb', line 41

def is_color_varied
  @is_color_varied
end

#overlapObject

Specifies how much bars and columns shall overlap on 2-D charts (from -100 to 100).



47
48
49
# File 'lib/aspose_slides_cloud/models/chart_series_group.rb', line 47

def overlap
  @overlap
end

#pie_split_byObject

Specifies how to determine which data points are in the second pie or bar on a pie-of-pie or bar-of-pie chart.



56
57
58
# File 'lib/aspose_slides_cloud/models/chart_series_group.rb', line 56

def pie_split_by
  @pie_split_by
end

#pie_split_positionObject

Specifies a value that shall be used to determine which data points are in the second pie or bar on a pie-of-pie or bar-of-pie chart. Is used together with PieSplitBy property.



53
54
55
# File 'lib/aspose_slides_cloud/models/chart_series_group.rb', line 53

def pie_split_position
  @pie_split_position
end

#second_pie_sizeObject

Specifies the size of the second pie or bar of a pie-of-pie chart or a bar-of-pie chart, as a percentage of the size of the first pie (can be between 5 and 200 percents).



50
51
52
# File 'lib/aspose_slides_cloud/models/chart_series_group.rb', line 50

def second_pie_size
  @second_pie_size
end

#typeObject

Returns a type of this series group.



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

def type
  @type
end

Class Method Details

.attribute_mapObject

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



93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# File 'lib/aspose_slides_cloud/models/chart_series_group.rb', line 93

def self.attribute_map
  {
    :'type' => :'Type',
    :'gap_width' => :'GapWidth',
    :'gap_depth' => :'GapDepth',
    :'first_slice_angle' => :'FirstSliceAngle',
    :'is_color_varied' => :'IsColorVaried',
    :'has_series_lines' => :'HasSeriesLines',
    :'overlap' => :'Overlap',
    :'second_pie_size' => :'SecondPieSize',
    :'pie_split_position' => :'PieSplitPosition',
    :'pie_split_by' => :'PieSplitBy',
    :'doughnut_hole_size' => :'DoughnutHoleSize',
    :'bubble_size_scale' => :'BubbleSizeScale',
    :'hi_low_lines_format' => :'HiLowLinesFormat',
    :'bubble_size_representation' => :'BubbleSizeRepresentation',
  }
end

.swagger_typesObject

Attribute type mapping.



113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
# File 'lib/aspose_slides_cloud/models/chart_series_group.rb', line 113

def self.swagger_types
  {
    :'type' => :'String',
    :'gap_width' => :'Integer',
    :'gap_depth' => :'Integer',
    :'first_slice_angle' => :'Integer',
    :'is_color_varied' => :'BOOLEAN',
    :'has_series_lines' => :'BOOLEAN',
    :'overlap' => :'Integer',
    :'second_pie_size' => :'Integer',
    :'pie_split_position' => :'Float',
    :'pie_split_by' => :'String',
    :'doughnut_hole_size' => :'Integer',
    :'bubble_size_scale' => :'Integer',
    :'hi_low_lines_format' => :'ChartLinesFormat',
    :'bubble_size_representation' => :'String',
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
# File 'lib/aspose_slides_cloud/models/chart_series_group.rb', line 248

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      type == o.type &&
      gap_width == o.gap_width &&
      gap_depth == o.gap_depth &&
      first_slice_angle == o.first_slice_angle &&
      is_color_varied == o.is_color_varied &&
      has_series_lines == o.has_series_lines &&
      overlap == o.overlap &&
      second_pie_size == o.second_pie_size &&
      pie_split_position == o.pie_split_position &&
      pie_split_by == o.pie_split_by &&
      doughnut_hole_size == o.doughnut_hole_size &&
      bubble_size_scale == o.bubble_size_scale &&
      hi_low_lines_format == o.hi_low_lines_format &&
      bubble_size_representation == o.bubble_size_representation
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



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
# File 'lib/aspose_slides_cloud/models/chart_series_group.rb', line 315

def _deserialize(type, value)
  if value.nil?
    nil
  else
    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
      registry_type = AsposeSlidesCloud::TypeRegistry.get_type(type.to_s, value)
      if registry_type
        type = registry_type
      end
      temp_model = AsposeSlidesCloud.const_get(type).new
      temp_model.build_from_hash(value)
    end
  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



389
390
391
392
393
394
395
396
397
398
399
400
401
# File 'lib/aspose_slides_cloud/models/chart_series_group.rb', line 389

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



282
283
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
# File 'lib/aspose_slides_cloud/models/chart_series_group.rb', line 282

def build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)
  self.class.swagger_types.each_pair do |key, type|
    mapKey = self.class.attribute_map[key]
    if !mapKey.nil?
      val = attributes[mapKey]
      if val.nil?
        mapKeyString = mapKey.to_s
        mapKeyString[0] = mapKeyString[0].downcase
        mapKey = mapKeyString.to_sym
        val = attributes[mapKey]
      end
      if !val.nil?
        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 val.is_a?(Array)
            self.send("#{key}=", val.map { |v| _deserialize($1, v) })
          end
        else
          self.send("#{key}=", _deserialize(type, val))
        end
      end
    end
  end

  self
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


269
270
271
# File 'lib/aspose_slides_cloud/models/chart_series_group.rb', line 269

def eql?(o)
  self == o
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



275
276
277
# File 'lib/aspose_slides_cloud/models/chart_series_group.rb', line 275

def hash
  [type, gap_width, gap_depth, first_slice_angle, is_color_varied, has_series_lines, overlap, second_pie_size, pie_split_position, pie_split_by, doughnut_hole_size, bubble_size_scale, hi_low_lines_format, bubble_size_representation].hash
end

#list_invalid_propertiesObject

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

Returns:

  • Array for valid properties with the reasons



199
200
201
202
# File 'lib/aspose_slides_cloud/models/chart_series_group.rb', line 199

def list_invalid_properties
  invalid_properties = Array.new
  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



369
370
371
# File 'lib/aspose_slides_cloud/models/chart_series_group.rb', line 369

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



375
376
377
378
379
380
381
382
383
# File 'lib/aspose_slides_cloud/models/chart_series_group.rb', line 375

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



363
364
365
# File 'lib/aspose_slides_cloud/models/chart_series_group.rb', line 363

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



206
207
208
209
210
211
212
213
214
# File 'lib/aspose_slides_cloud/models/chart_series_group.rb', line 206

def valid?
  type_validator = EnumAttributeValidator.new('String', ['BarOfPieChart', 'PieOfPieChart', 'DoughnutChart', 'PieChart', 'AreaChartArea', 'AreaChartPercentsStackedArea', 'AreaChartStackedArea', 'BarChartHorizClustered', 'BarChartHorizStacked', 'BarChartHorizPercentsStacked', 'BarChartVertClustered', 'BarChartVertStacked', 'BarChartVertPercentsStacked', 'LineChartLine', 'LineChartStackedLine', 'LineChartPercentsStackedLine', 'RadarChart', 'FilledRadarChart', 'StockHighLowClose', 'StockOpenHighLowClose', 'StockVolumeHighLowClose', 'StockVolumeOpenHighLowClose', 'ScatterStraightMarker', 'ScatterSmoothMarker', 'AreaChartArea3D', 'AreaChartStackedArea3D', 'AreaChartPercentsStackedArea3D', 'Line3DChart', 'Pie3DChart', 'Bar3DChartVert', 'Bar3DChartVertClustered', 'Bar3DChartVertPercentsStackedColumn3D', 'Bar3DChartVertPercentsStackedCone', 'Bar3DChartVertPercentsStackedCylinder', 'Bar3DChartVertPercentsStackedPyramid', 'Bar3DChartVertStackedColumn3D', 'Bar3DChartVertStackedCone', 'Bar3DChartVertStackedCylinder', 'Bar3DChartVertStackedPyramid', 'Bar3DChartHorizClustered', 'Bar3DChartHorizStackedBar3D', 'Bar3DChartHorizStackedCone', 'Bar3DChartHorizStackedCylinder', 'Bar3DChartHorizStackedPyramid', 'Bar3DChartHorizPercentsStackedBar3D', 'Bar3DChartHorizPercentsStackedCone', 'Bar3DChartHorizPercentsStackedCylinder', 'Bar3DChartHorizPercentsStackedPyramid', 'SurfaceChartContour', 'SurfaceChartWireframeContour', 'SurfaceChartSurface3D', 'SurfaceChartWireframeSurface3D', 'BubbleChart', 'HistogramChart', 'ParetoLineChart', 'BoxAndWhiskerChart', 'WaterfallChart', 'FunnelChart', 'TreemapChart', 'MapChart', 'SunburstChart'])
  return false unless type_validator.valid?(@type)
  pie_split_by_validator = EnumAttributeValidator.new('String', ['Default', 'Custom', 'ByPercentage', 'ByPos', 'ByValue'])
  return false unless pie_split_by_validator.valid?(@pie_split_by)
  bubble_size_representation_validator = EnumAttributeValidator.new('String', ['Area', 'Width'])
  return false unless bubble_size_representation_validator.valid?(@bubble_size_representation)
  true
end