lib/write_xlsx/chart/stock.rb in write_xlsx-0.62.0 vs lib/write_xlsx/chart/stock.rb in write_xlsx-0.64.0
- old
+ new
@@ -25,14 +25,15 @@
include Writexlsx::Utility
def initialize(subtype)
super(subtype)
@show_crosses = false
+ @hi_low_lines = {}
# Override and reset the default axis values.
- @x_axis[:_defaults][:num_format] = 'dd/mm/yyyy'
- @x2_axis[:_defaults][:num_format] = 'dd/mm/yyyy'
+ @x_axis.defaults[:num_format] = 'dd/mm/yyyy'
+ @x2_axis.defaults[:num_format] = 'dd/mm/yyyy'
set_x_axis
set_x2_axis
end
#
@@ -60,11 +61,17 @@
@writer.tag_elements('c:stockChart') do
# Write the series elements.
series.each {|s| write_series(s)}
+ # Write the c:dtopLines element.
+ write_drop_lines
+
# Write the c:hiLowLines element.
- write_hi_low_lines if params[:primary_axes] == 1
+ write_hi_low_lines if ptrue?(params[:primary_axes])
+
+ # Write the c:upDownBars element.
+ write_up_down_bars
# Write the c:marker element.
write_marker_value
# Write the c:axId elements