Class: OoxmlParser::CommonChartData
- Inherits:
-
OOXMLDocumentObject
- Object
- OOXMLDocumentObject
- OoxmlParser::CommonChartData
- Defined in:
- lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/plot_area/common_chart_data.rb
Overview
Parsing common chart data
Instance Attribute Summary collapse
-
#grouping ⇒ ValuedChild
readonly
Type of grouping.
-
#series ⇒ Array<Series>
readonly
Series data.
Attributes inherited from OOXMLDocumentObject
Instance Method Summary collapse
-
#initialize(parent: nil) ⇒ CommonChartData
constructor
A new instance of CommonChartData.
-
#parse(node) ⇒ CommonChartData
Parse CommonChartData object.
Methods inherited from OOXMLDocumentObject
#==, #boolean_attribute_value, #parse_xml, #with_data?
Methods included from OoxmlObjectAttributeHelper
#attribute_enabled?, #option_enabled?
Methods included from OoxmlDocumentObjectHelper
Constructor Details
#initialize(parent: nil) ⇒ CommonChartData
Returns a new instance of CommonChartData.
11 12 13 14 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/plot_area/common_chart_data.rb', line 11 def initialize(parent: nil) @series = [] super end |
Instance Attribute Details
#grouping ⇒ ValuedChild (readonly)
Returns type of grouping.
7 8 9 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/plot_area/common_chart_data.rb', line 7 def grouping @grouping end |
#series ⇒ Array<Series> (readonly)
Returns series data.
9 10 11 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/plot_area/common_chart_data.rb', line 9 def series @series end |
Instance Method Details
#parse(node) ⇒ CommonChartData
Parse CommonChartData object
19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/plot_area/common_chart_data.rb', line 19 def parse(node) node.xpath('*').each do |node_child| case node_child.name when 'grouping' @grouping = ValuedChild.new(:symbol, parent: self).parse(node_child) when 'ser' @series << Series.new(parent: self).parse(node_child) end end self end |