summaryrefslogtreecommitdiffhomepage
path: root/lib/axlsx/drawing/bar_series.rb
diff options
context:
space:
mode:
authorJurriaan Pruis <[email protected]>2014-01-15 23:44:02 +0100
committerJurriaan Pruis <[email protected]>2014-02-26 20:09:21 +0100
commitbe8e00332c73439cf17083173ea74f1505100df9 (patch)
tree383ec2e23fc0a14aa5ad90e139648a79814eeded /lib/axlsx/drawing/bar_series.rb
parenta271a7d0f26ecb26d01aad00e094744d6fe8b0d2 (diff)
downloadcaxlsx-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/bar_series.rb')
-rw-r--r--lib/axlsx/drawing/bar_series.rb18
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/axlsx/drawing/bar_series.rb b/lib/axlsx/drawing/bar_series.rb
index d85345c9..a649a68a 100644
--- a/lib/axlsx/drawing/bar_series.rb
+++ b/lib/axlsx/drawing/bar_series.rb
@@ -52,20 +52,20 @@ module Axlsx
# @param [String] str
# @return [String]
def to_xml_string(str = '')
- super(str) do |str_inner|
+ super(str) do
colors.each_with_index do |c, index|
- str_inner << '<c:dPt>'
- str_inner << '<c:idx val="' << index.to_s << '"/>'
- str_inner << '<c:spPr><a:solidFill>'
- str_inner << '<a:srgbClr val="' << c << '"/>'
- str_inner << '</a:solidFill></c:spPr></c:dPt>'
+ str << '<c:dPt>'
+ str << ('<c:idx val="' << index.to_s << '"/>')
+ str << '<c:spPr><a:solidFill>'
+ str << ('<a:srgbClr val="' << c << '"/>')
+ str << '</a:solidFill></c:spPr></c:dPt>'
end
- @labels.to_xml_string(str_inner) unless @labels.nil?
- @data.to_xml_string(str_inner) unless @data.nil?
+ @labels.to_xml_string(str) unless @labels.nil?
+ @data.to_xml_string(str) unless @data.nil?
# this is actually only required for shapes other than box
- str_inner << '<c:shape val="' << shape.to_s << '"></c:shape>'
+ str << ('<c:shape val="' << shape.to_s << '"></c:shape>')
end
end