diff options
| author | Jonathan Tron <[email protected]> | 2015-08-07 21:32:31 +0200 |
|---|---|---|
| committer | Jonathan Tron <[email protected]> | 2015-08-07 21:32:31 +0200 |
| commit | 8babcca0c343490ad4f49c80e4940982c58fca98 (patch) | |
| tree | 097f2c729f5c73014075b52fbdf9b318552438e4 | |
| parent | de10419812c4d1a4e57e0e43d67bfecc22df3885 (diff) | |
| parent | 5a6f862c16262acf52e091b840cf85835d62e7b6 (diff) | |
| download | caxlsx-8babcca0c343490ad4f49c80e4940982c58fca98.tar.gz caxlsx-8babcca0c343490ad4f49c80e4940982c58fca98.zip | |
Merge pull request #412 from woto/master
Labels position on LineChart
| -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 |
