diff options
| author | Randy Morgan <[email protected]> | 2012-03-09 18:08:16 +0900 |
|---|---|---|
| committer | Randy Morgan <[email protected]> | 2012-03-09 18:08:16 +0900 |
| commit | a254ac9cd781bbad0121717374ce90fe124f29b9 (patch) | |
| tree | c8244cd63f2b1a1132715dfd20eaf9cf38f480d4 /lib/axlsx/drawing/graphic_frame.rb | |
| parent | b67258099041672ad679a0473f15ac2f311c6247 (diff) | |
| download | caxlsx-a254ac9cd781bbad0121717374ce90fe124f29b9.tar.gz caxlsx-a254ac9cd781bbad0121717374ce90fe124f29b9.zip | |
patch title serialization for graphic frame
Diffstat (limited to 'lib/axlsx/drawing/graphic_frame.rb')
| -rw-r--r-- | lib/axlsx/drawing/graphic_frame.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/axlsx/drawing/graphic_frame.rb b/lib/axlsx/drawing/graphic_frame.rb index 903ff1d6..178e0ea8 100644 --- a/lib/axlsx/drawing/graphic_frame.rb +++ b/lib/axlsx/drawing/graphic_frame.rb @@ -17,14 +17,14 @@ module Axlsx # @param [TwoCellAnchor] anchor # @param [Class] chart_type def initialize(anchor, chart_type, options) - DataTypeValidator.validate "Drawing.chart_type", Chart, chart_type + DataTypeValidator.validate "Drawing.chart_type", Chart, chart_type @anchor = anchor @chart = chart_type.new(self, options) end # The relationship id for this graphic # @return [String] - def rId + def rId "rId#{@anchor.index+1}" end @@ -32,10 +32,10 @@ module Axlsx # @param [Nokogiri::XML::Builder] xml The document builder instance this objects xml will be added to. # @return [String] def to_xml(xml) - xml.graphicFrame { + xml.graphicFrame { xml.nvGraphicFramePr { - xml.cNvPr :id=>2, :name=>chart.title - xml.cNvGraphicFramePr + xml.cNvPr :id=>2, :name=>chart.title.text + xml.cNvGraphicFramePr } xml.xfrm { xml[:a].off(:x=>0, :y=>0) @@ -47,7 +47,7 @@ module Axlsx } } } - + end end end |
