diff options
| author | Randy Morgan <[email protected]> | 2012-04-01 11:58:09 +0900 |
|---|---|---|
| committer | Randy Morgan <[email protected]> | 2012-04-01 11:58:09 +0900 |
| commit | 1529fce32449a8454208fded20d83c9ceca810e0 (patch) | |
| tree | 02f722182fea58a51b8c0a5433221b3a677e80e4 /lib/axlsx/drawing/pie_3D_chart.rb | |
| parent | 22a341841f191a5aa00e87b1f166b4f25cc67f0a (diff) | |
| download | caxlsx-1529fce32449a8454208fded20d83c9ceca810e0.tar.gz caxlsx-1529fce32449a8454208fded20d83c9ceca810e0.zip | |
rebuild all serialization to use string concatenation instead of nokogiri.
Diffstat (limited to 'lib/axlsx/drawing/pie_3D_chart.rb')
| -rw-r--r-- | lib/axlsx/drawing/pie_3D_chart.rb | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/lib/axlsx/drawing/pie_3D_chart.rb b/lib/axlsx/drawing/pie_3D_chart.rb index cb36e4f5..67ae791b 100644 --- a/lib/axlsx/drawing/pie_3D_chart.rb +++ b/lib/axlsx/drawing/pie_3D_chart.rb @@ -11,7 +11,7 @@ module Axlsx # Creates a new pie chart object # @param [GraphicFrame] frame The workbook that owns this chart. # @option options [Cell, String] title - # @option options [Boolean] show_legend + # @option options [Boolean] show_legend # @option options [Symbol] grouping # @option options [String] gapDepth # @option options [Integer] rotX @@ -28,15 +28,14 @@ module Axlsx @view3D = View3D.new({:rotX=>30, :perspective=>30}.merge(options)) end - # Serializes the pie chart - # @return [String] - def to_xml - super() do |xml| - xml[:c].pie3DChart { - xml[:c].varyColors :val=>1 - @series.each { |ser| ser.to_xml(xml) } - } + def to_xml_string(str = '') + super(str) do |str_inner| + str_inner << '<c:pie3DChart>' + str_inner << '<c:varyColors val="1"/>' + @series.each { |ser| ser.to_xml_string(str_inner) } + str_inner << '</c:pie3DChart>' end end + end end |
