lib/write_xlsx/chart/series.rb in write_xlsx-0.72.3.beta1 vs lib/write_xlsx/chart/series.rb in write_xlsx-0.73.0

- old
+ new

@@ -81,11 +81,11 @@ :none => 'none', :square => 'square', :diamond => 'diamond', :triangle => 'triangle', :x => 'x', - :star => 'start', + :star => 'star', :dot => 'dot', :short_dash => 'dot', :dash => 'dash', :long_dash => 'dash', :circle => 'circle', @@ -158,21 +158,26 @@ def error_bars_properties(params = {}) return if !ptrue?(params) || params.empty? # Default values. error_bars = { - :_type => 'fixedVal', - :_value => 1, - :_endcap => 1, - :_direction => 'both' + :_type => 'fixedVal', + :_value => 1, + :_endcap => 1, + :_direction => 'both', + :_plus_values => [1], + :_minus_values => [1], + :_plus_data => [], + :_minus_data => [] } types = { :fixed => 'fixedVal', :percentage => 'percentage', :standard_deviation => 'stdDev', - :standard_error => 'stdErr' + :standard_error => 'stdErr', + :custom => 'cust' } # Check the error bars type. error_type = params[:type].to_sym @@ -200,9 +205,15 @@ error_bars[:_direction] = 'plus' else # Default to 'both' end end + + # Set any custom values + error_bars[:_plus_values] = params[:plus_values] if params[:plus_values] + error_bars[:_minus_values] = params[:minus_values] if params[:minus_values] + error_bars[:_plus_data] = params[:plus_data] if params[:plus_data] + error_bars[:_minus_data] = params[:minus_data] if params[:minus_data] # Set the line properties for the error bars. error_bars[:_line] = line_properties(params[:line]) error_bars