diff options
| author | Randy Morgan <[email protected]> | 2011-11-23 12:28:10 +0900 |
|---|---|---|
| committer | Randy Morgan <[email protected]> | 2011-11-23 12:28:10 +0900 |
| commit | 6739c249e7bf3cf7d2132b2aa49b6faf6bebec29 (patch) | |
| tree | c68e1527212c3665464debeebd2d97c127b0887e /lib/axlsx/drawing/cat_axis.rb | |
| parent | 099a1d5a7824b7a6392bfe2f124ebeaf9d8122db (diff) | |
| download | caxlsx-6739c249e7bf3cf7d2132b2aa49b6faf6bebec29.tar.gz caxlsx-6739c249e7bf3cf7d2132b2aa49b6faf6bebec29.zip | |
-refactoring chart position and axis data/category for chart.
-additional specs and documentation improvements.
Diffstat (limited to 'lib/axlsx/drawing/cat_axis.rb')
| -rw-r--r-- | lib/axlsx/drawing/cat_axis.rb | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/lib/axlsx/drawing/cat_axis.rb b/lib/axlsx/drawing/cat_axis.rb index f2458ffc..083eac68 100644 --- a/lib/axlsx/drawing/cat_axis.rb +++ b/lib/axlsx/drawing/cat_axis.rb @@ -1,6 +1,7 @@ module Axlsx #A CatAxis object defines a chart category axis class CatAxis < Axis + # From the docs: This element specifies that this axis is a date or text axis based on the data that is used for the axis labels, not a specific choice. # @return [Boolean] attr_accessor :auto @@ -18,23 +19,20 @@ module Axlsx # regex for validating label offset LBL_OFFSET_REGEX = /0*(([0-9])|([1-9][0-9])|([1-9][0-9][0-9])|1000)%/ - # Creates a new CatAxis 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 + # Creates a new CatAxis object + # @param [Integer] axId the id of this axis. Inherited + # @param [Integer] crossAx the id of the perpendicular axis. Inherited + # @option options [Symbol] axPos. Inherited + # @option options [Symbol] tickLblPos. Inherited + # @option options [Symbol] crosses. Inherited # @option options [Boolean] auto # @option options [Symbol] lblAlgn # @option options [Integer] lblOffset def initialize(axId, crossAx, options={}) - super(axId, crossAx, options) self.auto = true self.lblAlgn = :ctr self.lblOffset = "100%" - options.each do |o| - self.send("#{o[0]}=", o[1]) if self.respond_to? "#{o[0]}=" - end + super(axId, crossAx, options) end def auto=(v) Axlsx::validate_boolean(v); @auto = v; end |
