Class: OoxmlParser::View3D

Inherits:
OOXMLDocumentObject show all
Defined in:
lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/view_3d.rb

Overview

Parsing Chart 3D view tag ‘view3D’

Instance Attribute Summary collapse

Attributes inherited from OOXMLDocumentObject

#parent

Instance Method Summary collapse

Methods inherited from OOXMLDocumentObject

#==, #boolean_attribute_value, #initialize, #parse_xml, #with_data?

Methods included from OoxmlObjectAttributeHelper

#attribute_enabled?, #option_enabled?

Methods included from OoxmlDocumentObjectHelper

#to_hash

Constructor Details

This class inherits a constructor from OoxmlParser::OOXMLDocumentObject

Instance Attribute Details

#right_angle_axisTrue, False

chart axes are at right angles, rather than drawn in perspective. Applies only to 3-D charts.

Returns:

  • (True, False)

    This element specifies that the



15
16
17
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/view_3d.rb', line 15

def right_angle_axis
  @right_angle_axis
end

#rotation_xValuedChild

a 3-D chart shall be rotated in the X direction

Returns:



8
9
10
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/view_3d.rb', line 8

def rotation_x
  @rotation_x
end

#rotation_yValuedChild

a 3-D chart shall be rotated in the Y direction

Returns:



11
12
13
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/view_3d.rb', line 11

def rotation_y
  @rotation_y
end

Instance Method Details

#parse(node) ⇒ View3D

Parse View3D object

Parameters:

  • node (Nokogiri::XML:Element)

    node to parse

Returns:

  • (View3D)

    result of parsing



20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/view_3d.rb', line 20

def parse(node)
  node.xpath('*').each do |node_child|
    case node_child.name
    when 'rotX'
      @rotation_x = ValuedChild.new(:integer, parent: self).parse(node_child)
    when 'rotY'
      @rotation_y = ValuedChild.new(:integer, parent: self).parse(node_child)
    when 'rAngAx'
      @right_angle_axis = option_enabled?(node_child)
    end
  end
  self
end