Sha256: 62eefcaf0fc165ad1e0a2b8cfbc73d7e01da2f47f7716eef451f9a66b3fa070b

Contents?: true

Size: 717 Bytes

Versions: 2

Compression:

Stored size: 717 Bytes

Contents

module Axlsx
  # A series title is a Title with a slightly different serialization than chart titles.
  class SeriesTitle < Title
    # Serializes the object
    # @param [String] str
    # @return [String]
    def to_xml_string(str = '')
      clean_value = Axlsx::trust_input ? @text.to_s : ::CGI.escapeHTML(Axlsx::sanitize(@text.to_s))

      str << '<c:tx>'
      str << '<c:strRef>'
      str << ('<c:f>' << Axlsx::cell_range([@cell]) << '</c:f>')
      str << '<c:strCache>'
      str << '<c:ptCount val="1"/>'
      str << '<c:pt idx="0">'
      str << ('<c:v>' << clean_value << '</c:v>')
      str << '</c:pt>'
      str << '</c:strCache>'
      str << '</c:strRef>'
      str << '</c:tx>'
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
caxlsx-3.4.1 lib/axlsx/drawing/series_title.rb
caxlsx-3.4.0 lib/axlsx/drawing/series_title.rb