Method: Axlsx::LineSeries#to_xml_string

Defined in:
lib/axlsx/drawing/line_series.rb

#to_xml_string(str = '') ⇒ String

Serializes the object

Parameters:

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

Returns:

  • (String)


41
42
43
44
45
46
47
48
49
50
51
52
# File 'lib/axlsx/drawing/line_series.rb', line 41

def to_xml_string(str = '')
  super(str) do
    if color
      str << '<c:spPr><a:solidFill>'
      str << '<a:srgbClr val="' << color << '"/>'
      str << '</a:solidFill></c:spPr>'
    end

    @labels.to_xml_string(str) unless @labels.nil?
    @data.to_xml_string(str) unless @data.nil?
  end
end