lib/write_xlsx/chart/series.rb in write_xlsx-0.72.2 vs lib/write_xlsx/chart/series.rb in write_xlsx-0.72.3.beta1
- old
+ new
@@ -58,42 +58,10 @@
return data unless data.kind_of?(Array)
xl_range_formula(*data)
end
#
- # Convert user defined line properties to the structure required internally.
- #
- def line_properties(line) # :nodoc:
- return { :_defined => 0 } unless line
-
- dash_types = {
- :solid => 'solid',
- :round_dot => 'sysDot',
- :square_dot => 'sysDash',
- :dash => 'dash',
- :dash_dot => 'dashDot',
- :long_dash => 'lgDash',
- :long_dash_dot => 'lgDashDot',
- :long_dash_dot_dot => 'lgDashDotDot',
- :dot => 'dot',
- :system_dash_dot => 'sysDashDot',
- :system_dash_dot_dot => 'sysDashDotDot'
- }
-
- # Check the dash type.
- dash_type = line[:dash_type]
-
- if dash_type
- line[:dash_type] = value_or_raise(dash_types, dash_type, 'dash type')
- end
-
- line[:_defined] = 1
-
- line
- end
-
- #
# Convert user defined fill properties to the structure required internally.
#
def fill_properties(fill) # :nodoc:
return { :_defined => 0 } unless fill
@@ -296,12 +264,7 @@
labels[:position] = value_or_raise(positions, position, 'label position')
end
labels
- end
-
- def value_or_raise(hash, key, msg)
- raise "Unknown #{msg} '#{key}'" unless hash[key.to_sym]
- hash[key.to_sym]
end
end