Class: Axlsx::SeriesTitle

Inherits:
Title
  • Object
show all
Defined in:
lib/axlsx/drawing/series_title.rb

Overview

A series title is a Title with a slightly different serialization than chart titles.

Instance Attribute Summary

Attributes inherited from Title

#cell, #text

Instance Method Summary collapse

Methods inherited from Title

#initialize

Constructor Details

This class inherits a constructor from Axlsx::Title

Instance Method Details

#to_xml_string(str = '') ⇒ String

Serializes the object

Parameters:

  • str (String) (defaults to: '')

Returns:



9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/axlsx/drawing/series_title.rb', line 9

def to_xml_string(str = '')
  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>' << @text << '</c:v>')
  str << '</c:pt>'
  str << '</c:strCache>'
  str << '</c:strRef>'
  str << '</c:tx>'
end