Class: Axlsx::ValAxis
Overview
the ValAxis class defines a chart value axis.
Instance Attribute Summary collapse
-
#crossBetween ⇒ Symbol
This element specifies how the value axis crosses the category axis.
Attributes inherited from Axis
#axId, #axPos, #crossAx, #crosses, #format_code, #gridlines, #scaling, #tickLblPos
Instance Method Summary collapse
-
#initialize(axId, crossAx, options = {}) ⇒ ValAxis
constructor
Creates a new ValAxis object.
-
#to_xml_string(str = '') ⇒ String
Serializes the object.
Constructor Details
#initialize(axId, crossAx, options = {}) ⇒ ValAxis
Creates a new ValAxis object
18 19 20 21 |
# File 'lib/axlsx/drawing/val_axis.rb', line 18 def initialize(axId, crossAx, ={}) self.crossBetween = :between super(axId, crossAx, ) end |
Instance Attribute Details
#crossBetween ⇒ Symbol
This element specifies how the value axis crosses the category axis. must be one of [:between, :midCat]
9 10 11 |
# File 'lib/axlsx/drawing/val_axis.rb', line 9 def crossBetween @crossBetween end |
Instance Method Details
#to_xml_string(str = '') ⇒ String
Serializes the object
28 29 30 31 32 33 |
# File 'lib/axlsx/drawing/val_axis.rb', line 28 def to_xml_string(str = '') str << '<c:valAx>' super(str) str << '<c:crossBetween val="' << @crossBetween.to_s << '"/>' str << '</c:valAx>' end |