Class: Axlsx::View3D
- Inherits:
-
Object
- Object
- Axlsx::View3D
- Includes:
- OptionsParser
- Defined in:
- lib/axlsx/drawing/view_3D.rb
Overview
3D attributes for a chart.
Constant Summary collapse
- H_PERCENT_REGEX =
Validation for hPercent
/0*(([5-9])|([1-9][0-9])|([1-4][0-9][0-9])|500)/
- DEPTH_PERCENT_REGEX =
validation for depthPercent
/0*(([2-9][0-9])|([1-9][0-9][0-9])|(1[0-9][0-9][0-9])|2000)/
Instance Attribute Summary collapse
-
#depth_percent ⇒ String
(also: #depthPercent)
depth or chart as % of chart width must be between 20% and 2000%.
-
#h_percent ⇒ String
(also: #hPercent)
height of chart as % of chart width must be between 5% and 500%.
-
#perspective ⇒ Integer
field of view angle.
-
#r_ang_ax ⇒ Boolean
(also: #rAngAx)
Chart axis are at right angles.
-
#rot_x ⇒ Integer
(also: #rotX)
x rotation for the chart must be between -90 and 90.
-
#rot_y ⇒ Integer
(also: #rotY)
y rotation for the chart must be between 0 and 360.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ View3D
constructor
Creates a new View3D for charts.
-
#to_xml_string(str = '') ⇒ String
Serializes the object.
Methods included from OptionsParser
Constructor Details
#initialize(options = {}) ⇒ View3D
Creates a new View3D for charts
15 16 17 18 |
# File 'lib/axlsx/drawing/view_3D.rb', line 15 def initialize(={}) @rot_x, @h_percent, @rot_y, @depth_percent, @r_ang_ax, @perspective = nil, nil, nil, nil, nil, nil end |
Instance Attribute Details
#depth_percent ⇒ String Also known as: depthPercent
depth or chart as % of chart width must be between 20% and 2000%
47 48 49 |
# File 'lib/axlsx/drawing/view_3D.rb', line 47 def depth_percent @depth_percent end |
#h_percent ⇒ String Also known as: hPercent
height of chart as % of chart width must be between 5% and 500%
35 36 37 |
# File 'lib/axlsx/drawing/view_3D.rb', line 35 def h_percent @h_percent end |
#perspective ⇒ Integer
field of view angle
57 58 59 |
# File 'lib/axlsx/drawing/view_3D.rb', line 57 def perspective @perspective end |
#r_ang_ax ⇒ Boolean Also known as: rAngAx
Chart axis are at right angles
52 53 54 |
# File 'lib/axlsx/drawing/view_3D.rb', line 52 def r_ang_ax @r_ang_ax end |
#rot_x ⇒ Integer Also known as: rotX
x rotation for the chart must be between -90 and 90
29 30 31 |
# File 'lib/axlsx/drawing/view_3D.rb', line 29 def rot_x @rot_x end |
#rot_y ⇒ Integer Also known as: rotY
y rotation for the chart must be between 0 and 360
41 42 43 |
# File 'lib/axlsx/drawing/view_3D.rb', line 41 def rot_y @rot_y end |
Instance Method Details
#to_xml_string(str = '') ⇒ String
Serializes the object
99 100 101 102 103 104 105 |
# File 'lib/axlsx/drawing/view_3D.rb', line 99 def to_xml_string(str = '') str << '<c:view3D>' %w(rot_x h_percent rot_y depth_percent r_ang_ax perspective).each do |key| str << element_for_attribute(key, 'c') end str << '</c:view3D>' end |