diff options
| author | Erik Veijola <[email protected]> | 2015-07-28 15:10:37 +0300 |
|---|---|---|
| committer | Erik Veijola <[email protected]> | 2015-07-28 15:10:37 +0300 |
| commit | 18bfcd27f6ded316c28b6029911c1bdd231319ed (patch) | |
| tree | 456a90f14060fc30ad66cb14b9f5a8b6061e8b5c /lib/axlsx/drawing/scatter_series.rb | |
| parent | e250b11d4f8172753f18c0edc152d614a6feaf2f (diff) | |
| download | caxlsx-18bfcd27f6ded316c28b6029911c1bdd231319ed.tar.gz caxlsx-18bfcd27f6ded316c28b6029911c1bdd231319ed.zip | |
scatter_series.rb: added line_width to scatter series
Signed-off-by: Erik Veijola <[email protected]>
Diffstat (limited to 'lib/axlsx/drawing/scatter_series.rb')
| -rw-r--r-- | lib/axlsx/drawing/scatter_series.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/axlsx/drawing/scatter_series.rb b/lib/axlsx/drawing/scatter_series.rb index c0d6e8f1..6b71227c 100644 --- a/lib/axlsx/drawing/scatter_series.rb +++ b/lib/axlsx/drawing/scatter_series.rb @@ -21,6 +21,9 @@ module Axlsx # @return [String] attr_reader :color + # @return [String] + attr_reader :ln_width + # Line smoothing between data points # @return [Boolean] attr_reader :smooth @@ -36,6 +39,7 @@ module Axlsx Axlsx::validate_boolean(options[:smooth]) @smooth = options[:smooth] end + @ln_width = options[:ln_width] unless options[:ln_width].nil? super(chart, options) @xData = AxDataSource.new(:tag_name => :xVal, :data => options[:xData]) unless options[:xData].nil? @yData = NumDataSource.new({:tag_name => :yVal, :data => options[:yData]}) unless options[:yData].nil? @@ -52,6 +56,11 @@ module Axlsx @smooth = v end + # @see ln_width + def ln_width=(v) + @ln_width = v + end + # Serializes the object # @param [String] str # @return [String] @@ -74,6 +83,11 @@ module Axlsx str << '</c:spPr>' str << '</c:marker>' end + if ln_width + str << '<c:spPr>' + str << '<a:ln w="' << ln_width << '"/>' + str << '</c:spPr>' + end @xData.to_xml_string(str) unless @xData.nil? @yData.to_xml_string(str) unless @yData.nil? str << ('<c:smooth val="' << ((smooth) ? '1' : '0') << '"/>') |
