Class: Axlsx::AxDataSource

Inherits:
NumDataSource show all
Defined in:
lib/axlsx/drawing/ax_data_source.rb

Overview

Note:

only string data types are supported - mainly because we have not implemented a chart type that requires a numerical axis value

An axis data source that can contain referenced or literal strings or numbers

Instance Attribute Summary

Attributes inherited from NumDataSource

#data, #tag_name

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from NumDataSource

#to_xml_string

Methods included from OptionsParser

#parse_options

Constructor Details

#initialize(options = {}) ⇒ AxDataSource

creates a new NumDataSource object

Parameters:

  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • data (Array)

    An array of Cells or Numeric objects

  • tag_name (Symbol)

    see tag_name



10
11
12
13
14
15
# File 'lib/axlsx/drawing/ax_data_source.rb', line 10

def initialize(options = {})
  @tag_name = :cat
  @data_type = StrData
  @ref_tag_name = :strRef
  super(options)
end

Class Method Details

.allowed_tag_namesArray

allowed element tag names for serialization

Returns:

  • (Array)


19
20
21
# File 'lib/axlsx/drawing/ax_data_source.rb', line 19

def self.allowed_tag_names
  [:xVal, :cat]
end