Sha256: 0457d9a1e8b8f30052be71de484d86faa782e9247deb59edc72d9d1bb13f88b7

Contents?: true

Size: 969 Bytes

Versions: 4

Compression:

Stored size: 969 Bytes

Contents

# encoding: UTF-8
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 :cross_between
    alias :crossBetween :cross_between

    # Creates a new ValAxis object
    # @option options [Symbol] crosses_between
    def initialize(options={})
      self.cross_between = :between
      super(options)
    end

    # @see cross_between
    def cross_between=(v)
      RestrictionValidator.validate "ValAxis.cross_between", [:between, :midCat], v
      @cross_between = v
    end
    alias :crossBetween= :cross_between=

    # Serializes the object
    # @param [String] str
    # @return [String]
    def to_xml_string(str = '')
      str << '<c:valAx>'
      super(str)
      str << '<c:crossBetween val="' << @cross_between.to_s << '"/>'
      str << '</c:valAx>'
    end

  end
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
caxlsx-2.0.2 lib/axlsx/drawing/val_axis.rb
axlsx-2.0.1 lib/axlsx/drawing/val_axis.rb
axlsx-2.0.0 lib/axlsx/drawing/val_axis.rb
axlsx-1.3.6 lib/axlsx/drawing/val_axis.rb