diff options
| author | Jurriaan Pruis <[email protected]> | 2014-01-15 23:44:02 +0100 |
|---|---|---|
| committer | Jurriaan Pruis <[email protected]> | 2014-02-26 20:09:21 +0100 |
| commit | be8e00332c73439cf17083173ea74f1505100df9 (patch) | |
| tree | 383ec2e23fc0a14aa5ad90e139648a79814eeded /lib/axlsx/drawing/axis.rb | |
| parent | a271a7d0f26ecb26d01aad00e094744d6fe8b0d2 (diff) | |
| download | caxlsx-be8e00332c73439cf17083173ea74f1505100df9.tar.gz caxlsx-be8e00332c73439cf17083173ea74f1505100df9.zip | |
Huge refactoring
Do not create huge strings
Let Row inherit from SimpleTypedList
Optimized sanitizing
Optimized validation
And more..
Diffstat (limited to 'lib/axlsx/drawing/axis.rb')
| -rw-r--r-- | lib/axlsx/drawing/axis.rb | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/axlsx/drawing/axis.rb b/lib/axlsx/drawing/axis.rb index 32e40373..7e677a2e 100644 --- a/lib/axlsx/drawing/axis.rb +++ b/lib/axlsx/drawing/axis.rb @@ -150,10 +150,10 @@ module Axlsx # @param [String] str # @return [String] def to_xml_string(str = '') - str << '<c:axId val="' << @id.to_s << '"/>' + str << ('<c:axId val="' << @id.to_s << '"/>') @scaling.to_xml_string str - str << '<c:delete val="'<< @delete.to_s << '"/>' - str << '<c:axPos val="' << @ax_pos.to_s << '"/>' + str << ('<c:delete val="' << @delete.to_s << '"/>') + str << ('<c:axPos val="' << @ax_pos.to_s << '"/>') str << '<c:majorGridlines>' # TODO shape properties need to be extracted into a class if gridlines == false @@ -165,21 +165,21 @@ module Axlsx end str << '</c:majorGridlines>' @title.to_xml_string(str) unless @title == nil - str << '<c:numFmt formatCode="' << @format_code << '" sourceLinked="1"/>' + str << ('<c:numFmt formatCode="' << @format_code << '" sourceLinked="1"/>') str << '<c:majorTickMark val="none"/>' str << '<c:minorTickMark val="none"/>' - str << '<c:tickLblPos val="' << @tick_lbl_pos.to_s << '"/>' + str << ('<c:tickLblPos val="' << @tick_lbl_pos.to_s << '"/>') # TODO - this is also being used for series colors # time to extract this into a class spPr - Shape Properties if @color str << '<c:spPr><a:ln><a:solidFill>' - str << '<a:srgbClr val="' << @color << '"/>' + str << ('<a:srgbClr val="' << @color << '"/>') str << '</a:solidFill></a:ln></c:spPr>' end # some potential value in implementing this in full. Very detailed! - str << '<c:txPr><a:bodyPr rot="' << @label_rotation.to_s << '"/><a:lstStyle/><a:p><a:pPr><a:defRPr/></a:pPr><a:endParaRPr/></a:p></c:txPr>' - str << '<c:crossAx val="' << @cross_axis.id.to_s << '"/>' - str << '<c:crosses val="' << @crosses.to_s << '"/>' + str << ('<c:txPr><a:bodyPr rot="' << @label_rotation.to_s << '"/><a:lstStyle/><a:p><a:pPr><a:defRPr/></a:pPr><a:endParaRPr/></a:p></c:txPr>') + str << ('<c:crossAx val="' << @cross_axis.id.to_s << '"/>') + str << ('<c:crosses val="' << @crosses.to_s << '"/>') end end |
