Class: OoxmlParser::SparklineGroup
- Inherits:
-
OOXMLDocumentObject
- Object
- OOXMLDocumentObject
- OoxmlParser::SparklineGroup
- Defined in:
- lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/extension_list/extension/sparkline_groups/sparkline_group.rb
Overview
Class for sparklineGroup data
Instance Attribute Summary collapse
-
#color_first ⇒ OoxmlColor
readonly
First points color.
-
#color_high ⇒ OoxmlColor
readonly
High points color.
-
#color_last ⇒ OoxmlColor
readonly
Last points color.
-
#color_low ⇒ OoxmlColor
readonly
Low points color.
-
#color_markers ⇒ OoxmlColor
readonly
Markers color.
-
#color_negative ⇒ OoxmlColor
readonly
Negative points color.
-
#color_series ⇒ OoxmlColor
readonly
Color of series.
-
#display_empty_cells_as ⇒ Symbol
readonly
Display empty cells as.
-
#display_hidden ⇒ True, False
readonly
Display empty cells as.
-
#display_x_axis ⇒ True, False
readonly
Display x axis.
-
#first_point ⇒ True, False
readonly
Show first point.
-
#high_point ⇒ True, False
readonly
Show high point.
-
#last_point ⇒ True, False
readonly
Show last point.
-
#line_weight ⇒ OoxmlSize
readonly
Line weight.
-
#low_point ⇒ True, False
readonly
Show low point.
-
#manual_max ⇒ [Float] manual maximum value
readonly
- Float
-
manual maximum value.
-
#manual_min ⇒ Float
readonly
Manual minimum value.
-
#markers ⇒ True, False
readonly
Show markers.
-
#max_axis_type ⇒ True, False
readonly
Maximal axis type.
-
#min_axis_type ⇒ True, False
readonly
Minimal axis type.
-
#negative_point ⇒ True, False
readonly
Show negative point.
-
#right_to_left ⇒ True, False
readonly
Right to left.
-
#sparklines ⇒ Sparklines
readonly
Sparklines.
-
#type ⇒ Symbol
readonly
Type of group.
Attributes inherited from OOXMLDocumentObject
Instance Method Summary collapse
-
#parse(node) ⇒ SparklineGroup
Parse SparklineGroup.
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
#color_first ⇒ OoxmlColor (readonly)
46 47 48 |
# File 'lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/extension_list/extension/sparkline_groups/sparkline_group.rb', line 46 def color_first @color_first end |
#color_high ⇒ OoxmlColor (readonly)
42 43 44 |
# File 'lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/extension_list/extension/sparkline_groups/sparkline_group.rb', line 42 def color_high @color_high end |
#color_last ⇒ OoxmlColor (readonly)
48 49 50 |
# File 'lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/extension_list/extension/sparkline_groups/sparkline_group.rb', line 48 def color_last @color_last end |
#color_low ⇒ OoxmlColor (readonly)
44 45 46 |
# File 'lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/extension_list/extension/sparkline_groups/sparkline_group.rb', line 44 def color_low @color_low end |
#color_markers ⇒ OoxmlColor (readonly)
52 53 54 |
# File 'lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/extension_list/extension/sparkline_groups/sparkline_group.rb', line 52 def color_markers @color_markers end |
#color_negative ⇒ OoxmlColor (readonly)
50 51 52 |
# File 'lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/extension_list/extension/sparkline_groups/sparkline_group.rb', line 50 def color_negative @color_negative end |
#color_series ⇒ OoxmlColor (readonly)
40 41 42 |
# File 'lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/extension_list/extension/sparkline_groups/sparkline_group.rb', line 40 def color_series @color_series end |
#display_empty_cells_as ⇒ Symbol (readonly)
8 9 10 |
# File 'lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/extension_list/extension/sparkline_groups/sparkline_group.rb', line 8 def display_empty_cells_as @display_empty_cells_as end |
#display_hidden ⇒ True, False (readonly)
10 11 12 |
# File 'lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/extension_list/extension/sparkline_groups/sparkline_group.rb', line 10 def display_hidden @display_hidden end |
#display_x_axis ⇒ True, False (readonly)
12 13 14 |
# File 'lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/extension_list/extension/sparkline_groups/sparkline_group.rb', line 12 def display_x_axis @display_x_axis end |
#first_point ⇒ True, False (readonly)
32 33 34 |
# File 'lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/extension_list/extension/sparkline_groups/sparkline_group.rb', line 32 def first_point @first_point end |
#high_point ⇒ True, False (readonly)
28 29 30 |
# File 'lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/extension_list/extension/sparkline_groups/sparkline_group.rb', line 28 def high_point @high_point end |
#last_point ⇒ True, False (readonly)
34 35 36 |
# File 'lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/extension_list/extension/sparkline_groups/sparkline_group.rb', line 34 def last_point @last_point end |
#line_weight ⇒ OoxmlSize (readonly)
26 27 28 |
# File 'lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/extension_list/extension/sparkline_groups/sparkline_group.rb', line 26 def line_weight @line_weight end |
#low_point ⇒ True, False (readonly)
30 31 32 |
# File 'lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/extension_list/extension/sparkline_groups/sparkline_group.rb', line 30 def low_point @low_point end |
#manual_max ⇒ [Float] manual maximum value (readonly)
22 23 24 |
# File 'lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/extension_list/extension/sparkline_groups/sparkline_group.rb', line 22 def manual_max @manual_max end |
#manual_min ⇒ Float (readonly)
20 21 22 |
# File 'lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/extension_list/extension/sparkline_groups/sparkline_group.rb', line 20 def manual_min @manual_min end |
#markers ⇒ True, False (readonly)
38 39 40 |
# File 'lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/extension_list/extension/sparkline_groups/sparkline_group.rb', line 38 def markers @markers end |
#max_axis_type ⇒ True, False (readonly)
18 19 20 |
# File 'lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/extension_list/extension/sparkline_groups/sparkline_group.rb', line 18 def max_axis_type @max_axis_type end |
#min_axis_type ⇒ True, False (readonly)
16 17 18 |
# File 'lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/extension_list/extension/sparkline_groups/sparkline_group.rb', line 16 def min_axis_type @min_axis_type end |
#negative_point ⇒ True, False (readonly)
36 37 38 |
# File 'lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/extension_list/extension/sparkline_groups/sparkline_group.rb', line 36 def negative_point @negative_point end |
#right_to_left ⇒ True, False (readonly)
14 15 16 |
# File 'lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/extension_list/extension/sparkline_groups/sparkline_group.rb', line 14 def right_to_left @right_to_left end |
#sparklines ⇒ Sparklines (readonly)
54 55 56 |
# File 'lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/extension_list/extension/sparkline_groups/sparkline_group.rb', line 54 def sparklines @sparklines end |
#type ⇒ Symbol (readonly)
24 25 26 |
# File 'lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/extension_list/extension/sparkline_groups/sparkline_group.rb', line 24 def type @type end |
Instance Method Details
#parse(node) ⇒ SparklineGroup
Parse SparklineGroup
59 60 61 62 63 64 65 66 67 68 69 70 71 72 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 |
# File 'lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/extension_list/extension/sparkline_groups/sparkline_group.rb', line 59 def parse(node) node.attributes.each do |key, value| case key when 'type' @type = value_to_symbol(value) when 'displayEmptyCellsAs' @display_empty_cells_as = value_to_symbol(value) when 'displayHidden' @display_hidden = attribute_enabled?(value) when 'displayXAxis' @display_x_axis = attribute_enabled?(value) when 'rightToLeft' @right_to_left = attribute_enabled?(value) when 'minAxisType' @min_axis_type = value_to_symbol(value) when 'maxAxisType' @max_axis_type = value_to_symbol(value) when 'manualMin' @manual_min = value.value.to_f when 'manualMax' @manual_max = value.value.to_f when 'lineWeight' @line_weight = OoxmlSize.new(value.value.to_f, :point) when 'high' @high_point = attribute_enabled?(value) when 'low' @low_point = attribute_enabled?(value) when 'first' @first_point = attribute_enabled?(value) when 'last' @last_point = attribute_enabled?(value) when 'negative' @negative_point = attribute_enabled?(value) when 'markers' @markers = attribute_enabled?(value) end end node.xpath('*').each do |node_child| case node_child.name when 'colorSeries' @color_series = OoxmlColor.new(parent: self).parse(node_child) when 'colorHigh' @color_high = OoxmlColor.new(parent: self).parse(node_child) when 'colorLow' @color_low = OoxmlColor.new(parent: self).parse(node_child) when 'colorFirst' @color_first = OoxmlColor.new(parent: self).parse(node_child) when 'colorLast' @color_last = OoxmlColor.new(parent: self).parse(node_child) when 'colorNegative' @color_negative = OoxmlColor.new(parent: self).parse(node_child) when 'colorMarkers' @color_markers = OoxmlColor.new(parent: self).parse(node_child) when 'sparklines' @sparklines = Sparklines.new(parent: self).parse(node_child) end end self end |