Class: OoxmlParser::ChartStyleFile
- Inherits:
-
OOXMLDocumentObject
- Object
- OOXMLDocumentObject
- OoxmlParser::ChartStyleFile
- Defined in:
- lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/chart_style_file.rb
Overview
Class for parsing Chart Style data from file
Instance Attribute Summary collapse
-
#axis_title ⇒ ChartStyleEntry
readonly
Axis title entry.
-
#category_axis ⇒ ChartStyleEntry
readonly
Axis category entry.
-
#chart_area ⇒ ChartStyleEntry
readonly
Chart area entry.
-
#data_label ⇒ ChartStyleEntry
readonly
Data label entry.
-
#data_label_callout ⇒ ChartStyleEntry
readonly
Data label entry.
-
#data_point ⇒ ChartStyleEntry
readonly
Data point entry.
-
#data_point_3d ⇒ ChartStyleEntry
readonly
Data point 3d entry.
-
#data_point_line ⇒ ChartStyleEntry
readonly
Data point line entry.
-
#data_point_marker ⇒ ChartStyleEntry
readonly
Data point marker entry.
-
#data_point_marker_layout ⇒ ChartStyleEntry
readonly
Data point marker layout entry.
-
#data_point_wireframe ⇒ ChartStyleEntry
readonly
Data point wireframe entry.
-
#data_table ⇒ ChartStyleEntry
readonly
Data table entry.
-
#down_bar ⇒ ChartStyleEntry
readonly
Down bar entry.
-
#drop_line ⇒ ChartStyleEntry
readonly
Drop line entry.
-
#error_bar ⇒ ChartStyleEntry
readonly
Error bar entry.
-
#floor ⇒ ChartStyleEntry
readonly
Floor entry.
-
#gridline_major ⇒ ChartStyleEntry
readonly
Gridline major entry.
-
#gridline_minor ⇒ ChartStyleEntry
readonly
Gridline minor entry.
-
#high_low_line ⇒ ChartStyleEntry
readonly
High low line entry.
-
#leader_line ⇒ ChartStyleEntry
readonly
Leader line entry.
-
#legend ⇒ ChartStyleEntry
readonly
Legend entry.
-
#plot_area ⇒ ChartStyleEntry
readonly
Plot area entry.
-
#plot_area_3d ⇒ ChartStyleEntry
readonly
Plot area 3d entry.
-
#series_axis ⇒ ChartStyleEntry
readonly
Series axis entry.
-
#series_line ⇒ ChartStyleEntry
readonly
Series line entry.
-
#title ⇒ ChartStyleEntry
readonly
Title entry.
-
#trend_line ⇒ ChartStyleEntry
readonly
Trend line entry.
-
#trend_line_label ⇒ ChartStyleEntry
readonly
Trend line label entry.
-
#up_bar ⇒ ChartStyleEntry
readonly
Up bar entry.
-
#value_axis ⇒ ChartStyleEntry
readonly
Value axis entry.
-
#wall ⇒ ChartStyleEntry
readonly
Wall entry.
Attributes inherited from OOXMLDocumentObject
Instance Method Summary collapse
-
#parse(file) ⇒ ChartStyleFile
Parse Chart style file.
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
#axis_title ⇒ ChartStyleEntry (readonly)
Returns axis title entry.
9 10 11 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/chart_style_file.rb', line 9 def axis_title @axis_title end |
#category_axis ⇒ ChartStyleEntry (readonly)
Returns axis category entry.
11 12 13 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/chart_style_file.rb', line 11 def category_axis @category_axis end |
#chart_area ⇒ ChartStyleEntry (readonly)
Returns chart area entry.
13 14 15 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/chart_style_file.rb', line 13 def chart_area @chart_area end |
#data_label ⇒ ChartStyleEntry (readonly)
Returns data label entry.
15 16 17 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/chart_style_file.rb', line 15 def data_label @data_label end |
#data_label_callout ⇒ ChartStyleEntry (readonly)
Returns data label entry.
17 18 19 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/chart_style_file.rb', line 17 def data_label_callout @data_label_callout end |
#data_point ⇒ ChartStyleEntry (readonly)
Returns data point entry.
19 20 21 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/chart_style_file.rb', line 19 def data_point @data_point end |
#data_point_3d ⇒ ChartStyleEntry (readonly)
Returns data point 3d entry.
21 22 23 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/chart_style_file.rb', line 21 def data_point_3d @data_point_3d end |
#data_point_line ⇒ ChartStyleEntry (readonly)
Returns data point line entry.
23 24 25 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/chart_style_file.rb', line 23 def data_point_line @data_point_line end |
#data_point_marker ⇒ ChartStyleEntry (readonly)
Returns data point marker entry.
25 26 27 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/chart_style_file.rb', line 25 def data_point_marker @data_point_marker end |
#data_point_marker_layout ⇒ ChartStyleEntry (readonly)
Returns data point marker layout entry.
27 28 29 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/chart_style_file.rb', line 27 def data_point_marker_layout @data_point_marker_layout end |
#data_point_wireframe ⇒ ChartStyleEntry (readonly)
Returns data point wireframe entry.
29 30 31 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/chart_style_file.rb', line 29 def data_point_wireframe @data_point_wireframe end |
#data_table ⇒ ChartStyleEntry (readonly)
Returns data table entry.
31 32 33 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/chart_style_file.rb', line 31 def data_table @data_table end |
#down_bar ⇒ ChartStyleEntry (readonly)
Returns down bar entry.
33 34 35 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/chart_style_file.rb', line 33 def @down_bar end |
#drop_line ⇒ ChartStyleEntry (readonly)
Returns drop line entry.
35 36 37 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/chart_style_file.rb', line 35 def drop_line @drop_line end |
#error_bar ⇒ ChartStyleEntry (readonly)
Returns error bar entry.
37 38 39 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/chart_style_file.rb', line 37 def @error_bar end |
#floor ⇒ ChartStyleEntry (readonly)
Returns floor entry.
39 40 41 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/chart_style_file.rb', line 39 def floor @floor end |
#gridline_major ⇒ ChartStyleEntry (readonly)
Returns gridline major entry.
41 42 43 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/chart_style_file.rb', line 41 def gridline_major @gridline_major end |
#gridline_minor ⇒ ChartStyleEntry (readonly)
Returns gridline minor entry.
43 44 45 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/chart_style_file.rb', line 43 def gridline_minor @gridline_minor end |
#high_low_line ⇒ ChartStyleEntry (readonly)
Returns high low line entry.
45 46 47 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/chart_style_file.rb', line 45 def high_low_line @high_low_line end |
#leader_line ⇒ ChartStyleEntry (readonly)
Returns leader line entry.
47 48 49 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/chart_style_file.rb', line 47 def leader_line @leader_line end |
#legend ⇒ ChartStyleEntry (readonly)
Returns legend entry.
49 50 51 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/chart_style_file.rb', line 49 def legend @legend end |
#plot_area ⇒ ChartStyleEntry (readonly)
Returns plot area entry.
51 52 53 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/chart_style_file.rb', line 51 def plot_area @plot_area end |
#plot_area_3d ⇒ ChartStyleEntry (readonly)
Returns plot area 3d entry.
53 54 55 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/chart_style_file.rb', line 53 def plot_area_3d @plot_area_3d end |
#series_axis ⇒ ChartStyleEntry (readonly)
Returns series axis entry.
55 56 57 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/chart_style_file.rb', line 55 def series_axis @series_axis end |
#series_line ⇒ ChartStyleEntry (readonly)
Returns series line entry.
57 58 59 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/chart_style_file.rb', line 57 def series_line @series_line end |
#title ⇒ ChartStyleEntry (readonly)
Returns title entry.
59 60 61 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/chart_style_file.rb', line 59 def title @title end |
#trend_line ⇒ ChartStyleEntry (readonly)
Returns trend line entry.
61 62 63 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/chart_style_file.rb', line 61 def trend_line @trend_line end |
#trend_line_label ⇒ ChartStyleEntry (readonly)
Returns trend line label entry.
63 64 65 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/chart_style_file.rb', line 63 def trend_line_label @trend_line_label end |
#up_bar ⇒ ChartStyleEntry (readonly)
Returns up bar entry.
65 66 67 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/chart_style_file.rb', line 65 def @up_bar end |
#value_axis ⇒ ChartStyleEntry (readonly)
Returns value axis entry.
67 68 69 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/chart_style_file.rb', line 67 def value_axis @value_axis end |
#wall ⇒ ChartStyleEntry (readonly)
Returns wall entry.
69 70 71 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/chart_style_file.rb', line 69 def wall @wall end |
Instance Method Details
#parse(file) ⇒ ChartStyleFile
Parse Chart style file
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/chart_style_file.rb', line 73 def parse(file) xml = parse_xml(file) xml.xpath('cs:chartStyle/*').each do |chart_node| case chart_node.name when 'axisTitle' @axis_title = ChartStyleEntry.new(parent: self).parse(chart_node) when 'categoryAxis' @category_axis = ChartStyleEntry.new(parent: self).parse(chart_node) when 'chartArea' @chart_area = ChartStyleEntry.new(parent: self).parse(chart_node) when 'dataLabel' @data_label = ChartStyleEntry.new(parent: self).parse(chart_node) when 'dataLabelCallout' @data_label_callout = ChartStyleEntry.new(parent: self).parse(chart_node) when 'dataPoint' @data_point = ChartStyleEntry.new(parent: self).parse(chart_node) when 'dataPoint3D' @data_point_3d = ChartStyleEntry.new(parent: self).parse(chart_node) when 'dataPointLine' @data_point_line = ChartStyleEntry.new(parent: self).parse(chart_node) when 'dataPointMarker' @data_point_marker = ChartStyleEntry.new(parent: self).parse(chart_node) when 'dataPointMarkerLayout' @data_point_marker_layout = MarkerLayout.new(parent: self).parse(chart_node) when 'dataPointWireframe' @data_point_wireframe = ChartStyleEntry.new(parent: self).parse(chart_node) when 'dataTable' @data_table = ChartStyleEntry.new(parent: self).parse(chart_node) when 'downBar' @down_bar = ChartStyleEntry.new(parent: self).parse(chart_node) when 'dropLine' @drop_line = ChartStyleEntry.new(parent: self).parse(chart_node) when 'errorBar' @error_bar = ChartStyleEntry.new(parent: self).parse(chart_node) when 'floor' @floor = ChartStyleEntry.new(parent: self).parse(chart_node) when 'gridlineMajor' @gridline_major = ChartStyleEntry.new(parent: self).parse(chart_node) when 'gridlineMinor' @gridline_minor = ChartStyleEntry.new(parent: self).parse(chart_node) when 'hiLoLine' @high_low_line = ChartStyleEntry.new(parent: self).parse(chart_node) when 'leaderLine' @leader_line = ChartStyleEntry.new(parent: self).parse(chart_node) when 'legend' @legend = ChartStyleEntry.new(parent: self).parse(chart_node) when 'plotArea' @plot_area = ChartStyleEntry.new(parent: self).parse(chart_node) when 'plotArea3D' @plot_area_3d = ChartStyleEntry.new(parent: self).parse(chart_node) when 'seriesAxis' @series_axis = ChartStyleEntry.new(parent: self).parse(chart_node) when 'seriesLine' @series_line = ChartStyleEntry.new(parent: self).parse(chart_node) when 'title' @title = ChartStyleEntry.new(parent: self).parse(chart_node) when 'trendline' @trend_line = ChartStyleEntry.new(parent: self).parse(chart_node) when 'trendlineLabel' @trend_line_label = ChartStyleEntry.new(parent: self).parse(chart_node) when 'upBar' @up_bar = ChartStyleEntry.new(parent: self).parse(chart_node) when 'valueAxis' @value_axis = ChartStyleEntry.new(parent: self).parse(chart_node) when 'wall' @wall = ChartStyleEntry.new(parent: self).parse(chart_node) end end self end |