class OoxmlParser::DisplayLabelsProperties
Chart
Label Properties, parse tag ‘dLbls`
Attributes
@return [True, False] is label is deleted
@return [True, False] is category name shown
@return [True, False] is series name shown
Public Class Methods
Source
# File lib/ooxml_parser/common_parser/common_data/alternate_content/chart/display_labels_properties.rb, line 14 def initialize(params = {}) @show_legend_key = params.fetch(:show_legend_key, false) @show_values = params.fetch(:show_values, false) super(parent: params[:parent]) end
Calls superclass method
Public Instance Methods
Source
# File lib/ooxml_parser/common_parser/common_data/alternate_content/chart/display_labels_properties.rb, line 23 def parse(node) node.xpath('*').each do |node_child| case node_child.name when 'dLblPos' @position = value_to_symbol(node_child.attribute('val')) when 'showLegendKey' @show_legend_key = true if node_child.attribute('val').value == '1' when 'showVal' @show_values = true if node_child.attribute('val').value == '1' when 'showCatName' @show_category_name = option_enabled?(node_child) when 'showSerName' @show_series_name = option_enabled?(node_child) when 'delete' @delete = option_enabled?(node_child) end end self end
Parse DisplayLabelsProperties
object @param node [Nokogiri::XML:Element] node to parse @return [DisplayLabelsProperties] result of parsing