summaryrefslogtreecommitdiffhomepage
path: root/lib/axlsx/drawing/bar_series.rb
diff options
context:
space:
mode:
authorRandy Morgan <[email protected]>2012-05-03 09:10:23 +0900
committerRandy Morgan <[email protected]>2012-05-03 09:10:23 +0900
commite622dc54069074198990beb0462da630bad38dd0 (patch)
tree4065eb11cf4dcd68440bf8347af4509c130fb11e /lib/axlsx/drawing/bar_series.rb
parent2dfdd1f26b1fc748da3b4edad9aeeaeae842aedb (diff)
downloadcaxlsx-e622dc54069074198990beb0462da630bad38dd0.tar.gz
caxlsx-e622dc54069074198990beb0462da630bad38dd0.zip
rebuild series data base objects with full implementation.
Address shape validation error.
Diffstat (limited to 'lib/axlsx/drawing/bar_series.rb')
-rw-r--r--lib/axlsx/drawing/bar_series.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/axlsx/drawing/bar_series.rb b/lib/axlsx/drawing/bar_series.rb
index 25523410..5863dacc 100644
--- a/lib/axlsx/drawing/bar_series.rb
+++ b/lib/axlsx/drawing/bar_series.rb
@@ -8,7 +8,7 @@ module Axlsx
# The data for this series.
- # @return [Array, SimpleTypedList]
+ # @return [NumDataSource]
attr_reader :data
# The labels for this series.
@@ -34,8 +34,8 @@ module Axlsx
@shape = :box
@colors = []
super(chart, options)
- self.labels = CatAxisData.new(options[:labels]) unless options[:labels].nil?
- self.data = NamedAxisData.new(:val, options[:data]) unless options[:data].nil?
+ self.labels = AxDataSource.new({:data => options[:labels]}) unless options[:labels].nil?
+ self.data = NumDataSource.new(options) unless options[:data].nil?
end
# @see colors
@@ -71,10 +71,10 @@ module Axlsx
private
# assigns the data for this series
- def data=(v) DataTypeValidator.validate "Series.data", [SimpleTypedList], v; @data = v; end
+ def data=(v) DataTypeValidator.validate "Series.data", [NumDataSource], v; @data = v; end
# assigns the labels for this series
- def labels=(v) DataTypeValidator.validate "Series.labels", [SimpleTypedList], v; @labels = v; end
+ def labels=(v) DataTypeValidator.validate "Series.labels", [AxDataSource], v; @labels = v; end
end