Method: Writexlsx::Chart::Bar#write_chart_type

Defined in:
lib/write_xlsx/chart/bar.rb

#write_chart_type(params) ⇒ Object

Override the virtual superclass method with a chart specific method.



60
61
62
63
64
65
66
67
68
69
# File 'lib/write_xlsx/chart/bar.rb', line 60

def write_chart_type(params)
  if params[:primary_axes] != 0
    # Reverse X and Y axes for Bar charts.
    @y_axis, @x_axis = @x_axis, @y_axis
    @y2_axis.position = 't' if @y2_axis.position == 'r'
  end

  # Write the c:barChart element.
  write_bar_chart(params)
end