Class: OoxmlParser::Series
- Inherits:
-
OOXMLDocumentObject
- Object
- OOXMLDocumentObject
- OoxmlParser::Series
- Defined in:
- lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/series.rb
Overview
Class for parsing ‘c:ser` object
Instance Attribute Summary collapse
-
#categories ⇒ SeriesText
Categories of chart.
- #display_labels ⇒ DisplayLabelsProperties
-
#index ⇒ Index
readonly
Index of chart.
-
#order ⇒ ValuedChild
readonly
Order of chart.
-
#text ⇒ SeriesText
Text of series.
-
#values ⇒ XYValues
readonly
Values of series.
-
#x_values ⇒ XYValues
readonly
Values of x.
-
#y_values ⇒ XYValues
readonly
Values of y.
Attributes inherited from OOXMLDocumentObject
Instance Method Summary collapse
-
#parse(node) ⇒ Series
Parse Series.
Methods inherited from OOXMLDocumentObject
#==, #boolean_attribute_value, #initialize, #parse_xml, #with_data?
Methods included from OoxmlObjectAttributeHelper
#attribute_enabled?, #option_enabled?
Methods included from OoxmlDocumentObjectHelper
Constructor Details
This class inherits a constructor from OoxmlParser::OOXMLDocumentObject
Instance Attribute Details
#categories ⇒ SeriesText
Returns categories of chart.
15 16 17 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/series.rb', line 15 def categories @categories end |
#display_labels ⇒ DisplayLabelsProperties
17 18 19 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/series.rb', line 17 def display_labels @display_labels end |
#index ⇒ Index (readonly)
Returns index of chart.
9 10 11 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/series.rb', line 9 def index @index end |
#order ⇒ ValuedChild (readonly)
Returns order of chart.
11 12 13 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/series.rb', line 11 def order @order end |
#text ⇒ SeriesText
Returns text of series.
13 14 15 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/series.rb', line 13 def text @text end |
#values ⇒ XYValues (readonly)
Returns values of series.
19 20 21 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/series.rb', line 19 def values @values end |
#x_values ⇒ XYValues (readonly)
Returns values of x.
21 22 23 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/series.rb', line 21 def x_values @x_values end |
#y_values ⇒ XYValues (readonly)
Returns values of y.
23 24 25 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/series.rb', line 23 def y_values @y_values end |
Instance Method Details
#parse(node) ⇒ Series
Parse Series
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/series.rb', line 28 def parse(node) node.xpath('*').each do |node_child| case node_child.name when 'idx' @index = ValuedChild.new(:integer, parent: self).parse(node_child) when 'order' @order = ValuedChild.new(:integer, parent: self).parse(node_child) when 'tx' @text = SeriesText.new(parent: self).parse(node_child) when 'cat' @categories = SeriesText.new(parent: self).parse(node_child) when 'dLbls' @display_labels = DisplayLabelsProperties.new(parent: self).parse(node_child) when 'val' @values = XYValues.new(parent: self).parse(node_child) when 'xVal' @x_values = XYValues.new(parent: self).parse(node_child) when 'yVal' @y_values = XYValues.new(parent: self).parse(node_child) end end self end |