diff options
| author | Ruslan Kornev <[email protected]> | 2015-08-07 17:54:38 +0500 |
|---|---|---|
| committer | Ruslan Kornev <[email protected]> | 2015-08-07 17:54:38 +0500 |
| commit | f511d7ee09709d3ebe0948aecd02afe0ff04c13c (patch) | |
| tree | 6837ddf11ae0ea8b68d84a5b41a34b6046a00e06 /lib/axlsx/drawing/d_lbls.rb | |
| parent | f3df653c1385e6ecc9e6074a221711e916833068 (diff) | |
| download | caxlsx-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.rb | 6 |
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 |
