Sha256: 6947e53bae008db56b6e474f7021b3ab2441f8c8809a18345147da7f69975ebe

Contents?: true

Size: 1.13 KB

Versions: 5

Compression:

Stored size: 1.13 KB

Contents

module Axlsx
  # the ValAxis class defines a chart value axis.
  class ValAxis < Axis

    # This element specifies how the value axis crosses the category axis.
    # must be one of [:between, :midCat]
    # @return [Symbol]
    attr_reader :crossBetween

    # Creates a new ValAxis object
    # @param [Integer] axId the id of this axis
    # @param [Integer] crossAx the id of the perpendicular axis
    # @option options [Symbol] axPos
    # @option options [Symbol] tickLblPos
    # @option options [Symbol] crosses
    # @option options [Symbol] crossesBetween
    def initialize(axId, crossAx, options={})
      self.crossBetween = :between
      super(axId, crossAx, options)
    end
    # @see crossBetween
    def crossBetween=(v) RestrictionValidator.validate "ValAxis.crossBetween", [:between, :midCat], v; @crossBetween = v; end

    # Serializes the value axis
    # @param [Nokogiri::XML::Builder] xml The document builder instance this objects xml will be added to.
    # @return [String]
    def to_xml(xml)
      xml.send('c:valAx') {
        super(xml)
        xml.send('c:crossBetween', :val=>@crossBetween)
      }
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
axlsx-1.0.13 lib/axlsx/drawing/val_axis.rb
axlsx-1.0.11 lib/axlsx/drawing/val_axis.rb
axlsx-1.0.10 lib/axlsx/drawing/val_axis.rb
axlsx-1.0.10a lib/axlsx/drawing/val_axis.rb
axlsx-1.0.9 lib/axlsx/drawing/val_axis.rb