lib/axlsx/drawing/cat_axis.rb in axlsx-1.1.6 vs lib/axlsx/drawing/cat_axis.rb in axlsx-1.1.7

- old
+ new

@@ -26,11 +26,11 @@ # @return [Boolean] attr_reader :tickMarkSkip # regex for validating label offset - LBL_OFFSET_REGEX = /0*(([0-9])|([1-9][0-9])|([1-9][0-9][0-9])|1000)%/ + LBL_OFFSET_REGEX = /0*(([0-9])|([1-9][0-9])|([1-9][0-9][0-9])|1000)/ # Creates a new CatAxis object # @param [Integer] axId the id of this axis. Inherited # @param [Integer] crossAx the id of the perpendicular axis. Inherited # @option options [Symbol] axPos. Inherited @@ -44,11 +44,11 @@ def initialize(axId, crossAx, options={}) @tickLblSkip = 1 @tickMarkSkip = 1 self.auto = 1 self.lblAlgn = :ctr - self.lblOffset = "100%" + self.lblOffset = "100" super(axId, crossAx, options) end # @see tickLblSkip @@ -75,10 +75,10 @@ def to_xml_string(str = '') str << '<c:catAx>' super(str) str << '<c:auto val="' << @auto.to_s << '"/>' str << '<c:lblAlgn val="' << @lblAlgn.to_s << '"/>' - str << '<c:lblOffset val="' << @lblOffset.to_s << '"/>' + str << '<c:lblOffset val="' << @lblOffset.to_i.to_s << '"/>' str << '<c:tickLblSkip val="' << @tickLblSkip.to_s << '"/>' str << '<c:tickMarkSkip val="' << @tickMarkSkip.to_s << '"/>' str << '</c:catAx>' end