summaryrefslogtreecommitdiffhomepage
path: root/lib/axlsx/drawing/val_axis.rb
diff options
context:
space:
mode:
authorRandy Morgan <[email protected]>2013-03-17 15:38:55 +0900
committerRandy Morgan <[email protected]>2013-03-17 15:38:55 +0900
commitae75ef360e3e0da253188d408a3cbc81ed3897e6 (patch)
tree9bf184d72c4a78b3f14731af511aad26002a51ad /lib/axlsx/drawing/val_axis.rb
parent17f135ab215ba05b85ef92a15ed0038ea7556de9 (diff)
downloadcaxlsx-ae75ef360e3e0da253188d408a3cbc81ed3897e6.tar.gz
caxlsx-ae75ef360e3e0da253188d408a3cbc81ed3897e6.zip
Fixed LineChart and refactored chart axes management
Diffstat (limited to 'lib/axlsx/drawing/val_axis.rb')
-rw-r--r--lib/axlsx/drawing/val_axis.rb27
1 files changed, 14 insertions, 13 deletions
diff --git a/lib/axlsx/drawing/val_axis.rb b/lib/axlsx/drawing/val_axis.rb
index 6e55c8ea..0e7a0800 100644
--- a/lib/axlsx/drawing/val_axis.rb
+++ b/lib/axlsx/drawing/val_axis.rb
@@ -6,21 +6,22 @@ module Axlsx
# This element specifies how the value axis crosses the category axis.
# must be one of [:between, :midCat]
# @return [Symbol]
- attr_reader :crossBetween
+ attr_reader :cross_between
+ alias :crossBetween :cross_between
# Creates a new ValAxis object
- # @param [Integer] axId the id of this axis
- # @param [Integer] crossAx the id of the perpendicular axis
- # @option options [Symbol] axPos
- # @option options [Symbol] tickLblPos
- # @option options [Symbol] crosses
- # @option options [Symbol] crossesBetween
- def initialize(axId, crossAx, options={})
- self.crossBetween = :between
- super(axId, crossAx, options)
+ # @option options [Symbol] crosses_between
+ def initialize(options={})
+ self.cross_between = :between
+ super(options)
end
- # @see crossBetween
- def crossBetween=(v) RestrictionValidator.validate "ValAxis.crossBetween", [:between, :midCat], v; @crossBetween = v; end
+
+ # @see cross_between
+ def cross_between=(v)
+ RestrictionValidator.validate "ValAxis.cross_between", [:between, :midCat], v
+ @cross_between = v
+ end
+ alias :crossBetween= :cross_between=
# Serializes the object
# @param [String] str
@@ -28,7 +29,7 @@ module Axlsx
def to_xml_string(str = '')
str << '<c:valAx>'
super(str)
- str << '<c:crossBetween val="' << @crossBetween.to_s << '"/>'
+ str << '<c:crossBetween val="' << @cross_between.to_s << '"/>'
str << '</c:valAx>'
end