summaryrefslogtreecommitdiffhomepage
path: root/lib/axlsx/drawing/graphic_frame.rb
diff options
context:
space:
mode:
authorRandy Morgan <[email protected]>2012-06-02 15:17:46 +0900
committerRandy Morgan <[email protected]>2012-06-02 15:17:46 +0900
commit2786ef5f7fc3a97403b69f530114860a19aa5fee (patch)
tree697da6bbea38afe51861c49e727a33958e97abdf /lib/axlsx/drawing/graphic_frame.rb
parent459a96af1045991720de9a46d47db9e5a809e4e3 (diff)
downloadcaxlsx-2786ef5f7fc3a97403b69f530114860a19aa5fee.tar.gz
caxlsx-2786ef5f7fc3a97403b69f530114860a19aa5fee.zip
quick fix for chart rendering problem.
Need to ensure that we are not pushing odd strings into a number data axis point. This should at least make sure we get a nice fat 0 for now, but it really needs a bit more than this.
Diffstat (limited to 'lib/axlsx/drawing/graphic_frame.rb')
-rw-r--r--lib/axlsx/drawing/graphic_frame.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/axlsx/drawing/graphic_frame.rb b/lib/axlsx/drawing/graphic_frame.rb
index fd65aa19..e36ae3f2 100644
--- a/lib/axlsx/drawing/graphic_frame.rb
+++ b/lib/axlsx/drawing/graphic_frame.rb
@@ -33,9 +33,9 @@ module Axlsx
# @return [String]
def to_xml_string(str = '')
# macro attribute should be optional!
- str << '<xdr:graphicFrame macro="">'
+ str << '<xdr:graphicFrame>'
str << '<xdr:nvGraphicFramePr>'
- str << '<xdr:cNvPr id="2" name="' << chart.title.text << '"/>'
+ str << '<xdr:cNvPr id="' << @anchor.drawing.worksheet.workbook.drawings.index(@anchor.drawing).to_s << '" name="' << chart.title.text << '"/>'
str << '<xdr:cNvGraphicFramePr/>'
str << '</xdr:nvGraphicFramePr>'
str << '<xdr:xfrm>'