Method: Axlsx::WorksheetDrawing#add_chart

Defined in:
lib/axlsx/workbook/worksheet/worksheet_drawing.rb

#add_chart(chart_type, options) ⇒ Object

adds a chart to the drawing object

Parameters:

  • chart_type (Class)

    The type of chart to add

  • options (Hash)

    Options to pass on to the drawing and chart

See Also:



25
26
27
28
# File 'lib/axlsx/workbook/worksheet/worksheet_drawing.rb', line 25

def add_chart(chart_type, options)
  @drawing ||= Drawing.new worksheet
  drawing.add_chart(chart_type, options)
end