Sha256: 0efde3aefb06fde4d3eca7293526d43e5d7465709b3c16f44d36d13f8354ed70

Contents?: true

Size: 719 Bytes

Versions: 3

Compression:

Stored size: 719 Bytes

Contents

module Axlsx
  # The ValAxisData class manages the values for a chart value series.
  class ValAxisData < CatAxisData

    # Serializes the value axis data
    # @param [Nokogiri::XML::Builder] xml The document builder instance this objects xml will be added to.
    # @return [String]
    def to_xml(xml)
      xml.val {
        xml.numRef {
          xml.f Axlsx::cell_range(@list)
          xml.numCache {
            xml.formatCode 'General'
            xml.ptCount :val=>size
            each_with_index do |item, index|
              v = item.is_a?(Cell) ? item.value : item
              xml.pt(:idx=>index) { xml.v v }
            end
          }                        
        }
      }
    end

  end
  
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
axlsx-1.0.16 lib/axlsx/drawing/val_axis_data.rb
axlsx-1.0.15 lib/axlsx/drawing/val_axis_data.rb
axlsx-1.0.14 lib/axlsx/drawing/val_axis_data.rb