Class: OoxmlParser::ChartStyleFile

Inherits:
OOXMLDocumentObject show all
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

Attributes inherited from OOXMLDocumentObject

#parent

Instance Method Summary collapse

Methods inherited from OOXMLDocumentObject

#==, #boolean_attribute_value, #initialize, #parse_xml, #with_data?

Methods included from OoxmlObjectAttributeHelper

#attribute_enabled?, #option_enabled?

Methods included from OoxmlDocumentObjectHelper

#to_hash

Constructor Details

This class inherits a constructor from OoxmlParser::OOXMLDocumentObject

Instance Attribute Details

#axis_titleChartStyleEntry (readonly)

Returns axis title entry.

Returns:



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_axisChartStyleEntry (readonly)

Returns axis category entry.

Returns:



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_areaChartStyleEntry (readonly)

Returns chart area entry.

Returns:



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_labelChartStyleEntry (readonly)

Returns data label entry.

Returns:



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_calloutChartStyleEntry (readonly)

Returns data label entry.

Returns:



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_pointChartStyleEntry (readonly)

Returns data point entry.

Returns:



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_3dChartStyleEntry (readonly)

Returns data point 3d entry.

Returns:



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_lineChartStyleEntry (readonly)

Returns data point line entry.

Returns:



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_markerChartStyleEntry (readonly)

Returns data point marker entry.

Returns:



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_layoutChartStyleEntry (readonly)

Returns data point marker layout entry.

Returns:



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_wireframeChartStyleEntry (readonly)

Returns data point wireframe entry.

Returns:



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_tableChartStyleEntry (readonly)

Returns data table entry.

Returns:



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_barChartStyleEntry (readonly)

Returns down bar entry.

Returns:



33
34
35
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/chart_style_file.rb', line 33

def down_bar
  @down_bar
end

#drop_lineChartStyleEntry (readonly)

Returns drop line entry.

Returns:



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_barChartStyleEntry (readonly)

Returns error bar entry.

Returns:



37
38
39
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/chart_style_file.rb', line 37

def error_bar
  @error_bar
end

#floorChartStyleEntry (readonly)

Returns floor entry.

Returns:



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_majorChartStyleEntry (readonly)

Returns gridline major entry.

Returns:



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_minorChartStyleEntry (readonly)

Returns gridline minor entry.

Returns:



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_lineChartStyleEntry (readonly)

Returns high low line entry.

Returns:



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_lineChartStyleEntry (readonly)

Returns leader line entry.

Returns:



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

#legendChartStyleEntry (readonly)

Returns legend entry.

Returns:



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_areaChartStyleEntry (readonly)

Returns plot area entry.

Returns:



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_3dChartStyleEntry (readonly)

Returns plot area 3d entry.

Returns:



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_axisChartStyleEntry (readonly)

Returns series axis entry.

Returns:



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_lineChartStyleEntry (readonly)

Returns series line entry.

Returns:



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

#titleChartStyleEntry (readonly)

Returns title entry.

Returns:



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_lineChartStyleEntry (readonly)

Returns trend line entry.

Returns:



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_labelChartStyleEntry (readonly)

Returns trend line label entry.

Returns:



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_barChartStyleEntry (readonly)

Returns up bar entry.

Returns:



65
66
67
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/chart_style_file.rb', line 65

def up_bar
  @up_bar
end

#value_axisChartStyleEntry (readonly)

Returns value axis entry.

Returns:



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

#wallChartStyleEntry (readonly)

Returns wall entry.

Returns:



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

Returns:



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