summaryrefslogtreecommitdiffhomepage
path: root/lib/axlsx/drawing/d_lbls.rb
diff options
context:
space:
mode:
authorRuslan Kornev <[email protected]>2015-08-07 17:54:38 +0500
committerRuslan Kornev <[email protected]>2015-08-07 17:54:38 +0500
commitf511d7ee09709d3ebe0948aecd02afe0ff04c13c (patch)
tree6837ddf11ae0ea8b68d84a5b41a34b6046a00e06 /lib/axlsx/drawing/d_lbls.rb
parentf3df653c1385e6ecc9e6074a221711e916833068 (diff)
downloadcaxlsx-f511d7ee09709d3ebe0948aecd02afe0ff04c13c.tar.gz
caxlsx-f511d7ee09709d3ebe0948aecd02afe0ff04c13c.zip
allow to use d_lbl_pos for LineChart
Diffstat (limited to 'lib/axlsx/drawing/d_lbls.rb')
-rw-r--r--lib/axlsx/drawing/d_lbls.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/axlsx/drawing/d_lbls.rb b/lib/axlsx/drawing/d_lbls.rb
index 74c01350..d2185033 100644
--- a/lib/axlsx/drawing/d_lbls.rb
+++ b/lib/axlsx/drawing/d_lbls.rb
@@ -49,7 +49,7 @@ module Axlsx
# @see d_lbl_pos= for a list of allowed values
# @return [Symbol]
def d_lbl_pos
- return unless @chart_type == Pie3DChart
+ return unless [Pie3DChart, LineChart].include? @chart_type
@d_lbl_pos ||= :bestFit
end
@@ -60,7 +60,7 @@ module Axlsx
# The default is :bestFit
# @param [Symbol] label_position the postion you want to use.
def d_lbl_pos=(label_position)
- return unless @chart_type == Pie3DChart
+ return unless [Pie3DChart, LineChart].include? @chart_type
Axlsx::RestrictionValidator.validate 'DLbls#d_lbl_pos', [:bestFit, :b, :ctr, :inBase, :inEnd, :l, :outEnd, :r, :t], label_position
@d_lbl_pos = label_position
end
@@ -80,7 +80,7 @@ module Axlsx
# nills out d_lbl_pos and show_leader_lines as these attributes, while valid in the spec actually chrash excel for any chart type other than pie charts.
def validate_attributes_for_chart_type
- return if @chart_type == Pie3DChart
+ return if [Pie3DChart, LineChart].include? @chart_type
@d_lbl_pos = nil
@show_leader_lines = nil
end