summaryrefslogtreecommitdiffhomepage
path: root/lib/axlsx/drawing/ax_data_source.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/axlsx/drawing/ax_data_source.rb')
-rw-r--r--lib/axlsx/drawing/ax_data_source.rb25
1 files changed, 25 insertions, 0 deletions
diff --git a/lib/axlsx/drawing/ax_data_source.rb b/lib/axlsx/drawing/ax_data_source.rb
new file mode 100644
index 00000000..5bbfd55b
--- /dev/null
+++ b/lib/axlsx/drawing/ax_data_source.rb
@@ -0,0 +1,25 @@
+module Axlsx
+ # An axis data source that can contain referenced or literal strings or numbers
+ # @note only string data types are supported - mainly because we have not implemented a chart type that requires a numerical axis value
+ class AxDataSource < NumDataSource
+
+ # allowed element tag names
+ # @return [Array]
+ def self.allowed_tag_names
+ [:xVal, :cat]
+ end
+
+ # creates a new NumDataSource object
+ # @option options [Array] data An array of Cells or Numeric objects
+ # @option options [Symbol] tag_name see tag_name
+ def initialize(options={})
+ @tag_name = :cat
+ @data_type = StrData
+ @ref_tag_name = :strRef
+ super(options)
+ end
+
+ end
+
+end
+