lib/write_xlsx/chart/bar.rb in write_xlsx-0.81.1 vs lib/write_xlsx/chart/bar.rb in write_xlsx-0.83.0

- old
+ new

@@ -41,9 +41,22 @@ 'outside_end' => 'outEnd' } end # + # Override parent method to add an extra check that is required for Bar + # charts to ensure that their combined chart is on a secondary axis. + # + def combine(chart) + + unless chart.is_secondary? + raise 'Charts combined with Bar charts must be on a secondary axis' + end + + super + end + + # # Override the virtual superclass method with a chart specific method. # def write_chart_type(params) if params[:primary_axes] != 0 # Reverse X and Y axes for Bar charts.