lib/write_xlsx/chart/stock.rb in write_xlsx-0.0.3 vs lib/write_xlsx/chart/stock.rb in write_xlsx-0.0.4

- old
+ new

@@ -41,16 +41,14 @@ # def write_stock_chart # Add default formatting to the series data. modify_series_formatting - @writer.start_tag('c:stockChart') - - # Write the series elements. - write_series - - @writer.end_tag('c:stockChart') + @writer.tag_elements('c:stockChart') do + # Write the series elements. + write_series + end end # # Over-ridden to add hi_low_lines(). TODO. Refactor up into the SUPER class. # @@ -81,24 +79,19 @@ # # Write the <c:plotArea> element. # def write_plot_area - @writer.start_tag('c:plotArea') - - # Write the c:layout element. - write_layout - - # Write the subclass chart type element. - write_chart_type - - # Write the c:dateAx element. - write_date_axis - - # Write the c:catAx element. - write_val_axis - - @writer.end_tag('c:plotArea') + @writer.tag_elements('c:plotArea') do + # Write the c:layout element. + write_layout + # Write the subclass chart type element. + write_chart_type + # Write the c:dateAx element. + write_date_axis + # Write the c:catAx element. + write_val_axis + end end # # Add default formatting to the series data. #