class OoxmlParser::SparklineGroup
Class for ‘sparklineGroup` data
Attributes
@return [OoxmlColor] first points color
@return [OoxmlColor] high points color
@return [OoxmlColor] last points color
@return [OoxmlColor] low points color
@return [OoxmlColor] markers color
@return [OoxmlColor] negative points color
@return [OoxmlColor] color of series
@return [Symbol] display empty cells as
@return [True, False] display x axis
@return [True, False] show first point
@return [True, False] show high point
@return [True, False] show last point
@return [OoxmlSize] line weight
@return [True, False] show low point
@return [[Float] manual maximum value
@return [Float] manual minimum value
@return [True, False] show markers
@return [True, False] maximal axis type
@return [True, False] minimal axis type
@return [True, False] show negative point
@return [True, False] right to left
@return [Sparklines] sparklines
@return [Symbol] type of group
Public Instance Methods
Parse SparklineGroup
@param [Nokogiri::XML:Node] node with SparklineGroup
@return [SparklineGroup] result of parsing
# 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