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

- old
+ new

@@ -38,33 +38,10 @@ # Write the c:barChart element. write_bar_chart end # - # Write the <c:barChart> element. - # - def write_bar_chart - subtype = @subtype - - subtype = 'percentStacked' if subtype == 'percent_stacked' - - @writer.start_tag('c:barChart') - - # Write the c:barDir element. - write_bar_dir - - # Write the c:grouping element. - write_grouping(subtype) - - # Write the series elements. - write_series - - @writer.end_tag('c:barChart') - end - - - # # Write the <c:barDir> element. # def write_bar_dir val = 'bar' @@ -77,30 +54,10 @@ # Over-ridden to add c:overlap. # # Write the series elements. # def write_series - # Write each series with subelements. - index = 0 - @series.each do |series| - write_ser(index, series) - index += 1 - end - - - # Write the c:marker element. - write_marker_value - - # Write the c:overlap element. - write_overlap if @subtype =~ /stacked/ - - # Generate the axis ids. - add_axis_id - add_axis_id - - # Write the c:axId element. - write_axis_id(@axis_ids[0]) - write_axis_id(@axis_ids[1]) + write_series_base {write_overlap if @subtype =~ /stacked/} end # # Over-ridden to add % format. TODO. This will be refactored back up to the