summaryrefslogtreecommitdiffhomepage
path: root/lib/axlsx/drawing/chart.rb
diff options
context:
space:
mode:
authorRandy Morgan <[email protected]>2013-01-15 21:53:47 +0900
committerRandy Morgan <[email protected]>2013-01-15 21:53:47 +0900
commit40c85619885de848447479b99c08e5feaea89a90 (patch)
tree61cebfceb3ac1d404e4893b376f9f3a5d72e3bd0 /lib/axlsx/drawing/chart.rb
parente14682fb484cd72ba5f479cc1f7d46a7a9fd6007 (diff)
downloadcaxlsx-40c85619885de848447479b99c08e5feaea89a90.tar.gz
caxlsx-40c85619885de848447479b99c08e5feaea89a90.zip
Refactored relationship management for drawings
This should fix #160
Diffstat (limited to 'lib/axlsx/drawing/chart.rb')
-rw-r--r--lib/axlsx/drawing/chart.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/axlsx/drawing/chart.rb b/lib/axlsx/drawing/chart.rb
index 1006f25e..081be949 100644
--- a/lib/axlsx/drawing/chart.rb
+++ b/lib/axlsx/drawing/chart.rb
@@ -63,6 +63,12 @@ module Axlsx
# @return [Boolean]
attr_reader :show_legend
+ # returns a relationship object for the chart
+ # @return [Axlsx::Relationship]
+ def relationship
+ Relationship.new(CHART_R, "../#{pn}")
+ end
+
# The index of this chart in the workbooks charts collection
# @return [Integer]
def index