Method: Axlsx::Worksheet#add_chart
- Defined in:
- lib/axlsx/workbook/worksheet/worksheet.rb
#add_chart(chart_type, options = {}) {|chart| ... } ⇒ Object
Note:
each chart type also specifies additional options
Adds a chart to this worksheets drawing. This is the recommended way to create charts for your worksheet. This method wraps the complexity of dealing with ooxml drawing, anchors, markers graphic frames chart objects and all the other dirty details.
421 422 423 424 425 |
# File 'lib/axlsx/workbook/worksheet/worksheet.rb', line 421 def add_chart(chart_type, ={}) chart = worksheet_drawing.add_chart(chart_type, ) yield chart if block_given? chart end |