diff options
| author | Randy Morgan <[email protected]> | 2012-06-05 13:03:32 +0900 |
|---|---|---|
| committer | Randy Morgan <[email protected]> | 2012-06-05 13:03:32 +0900 |
| commit | 2d6d18c2e0b8e1b68adae27500c002cfb4cd01b4 (patch) | |
| tree | 32fc2c25a21bba50f10d610cdeb157dd04276793 /lib/axlsx/drawing/chart.rb | |
| parent | 705b92c0764452cfa8a2b8e4130cadb0bd83e798 (diff) | |
| download | caxlsx-2d6d18c2e0b8e1b68adae27500c002cfb4cd01b4.tar.gz caxlsx-2d6d18c2e0b8e1b68adae27500c002cfb4cd01b4.zip | |
fix chart title parsing to properly handle non-cell based text runs
Diffstat (limited to 'lib/axlsx/drawing/chart.rb')
| -rw-r--r-- | lib/axlsx/drawing/chart.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/axlsx/drawing/chart.rb b/lib/axlsx/drawing/chart.rb index 0f26c551..f0f0185b 100644 --- a/lib/axlsx/drawing/chart.rb +++ b/lib/axlsx/drawing/chart.rb @@ -44,7 +44,7 @@ module Axlsx # @option options [Array|String|Cell] start_at The X, Y coordinates defining the top left corner of the chart. # @option options [Array|String|Cell] end_at The X, Y coordinates defining the bottom right corner of the chart. def initialize(frame, options={}) - @style = 2 + @style = 18 @view3D = nil @graphic_frame=frame @graphic_frame.anchor.drawing.worksheet.workbook.charts << self @@ -120,13 +120,13 @@ module Axlsx # @return [String] def to_xml_string(str = '') str << '<?xml version="1.0" encoding="UTF-8"?>' - str << '<c:chartSpace xmlns:c="' << XML_NS_C << '" xmlns:a="' << XML_NS_A << '">' + str << '<c:chartSpace xmlns:c="' << XML_NS_C << '" xmlns:a="' << XML_NS_A << '" xmlns:r="' << XML_NS_R << '">' str << '<c:date1904 val="' << Axlsx::Workbook.date1904.to_s << '"/>' str << '<c:style val="' << style.to_s << '"/>' str << '<c:chart>' @title.to_xml_string str # do these need the c: namespace as well??? - str << '<c:autoTitleDeleted val="0"/>' + str << '<c:autoTitleDeleted val="' << (@title == nil).to_s << '"/>' @view3D.to_xml_string(str) if @view3D str << '<c:floor><c:thickness val="0"/></c:floor>' str << '<c:sideWall><c:thickness val="0"/></c:sideWall>' |
