Method: Axlsx::AreaSeries#initialize

Defined in:
lib/axlsx/drawing/area_series.rb

#initialize(chart, options = {}) ⇒ AreaSeries

Creates a new series

Parameters:

  • chart (Chart)
  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • data (Array, SimpleTypedList)
  • labels (Array, SimpleTypedList)


38
39
40
41
42
43
44
45
46
# File 'lib/axlsx/drawing/area_series.rb', line 38

def initialize(chart, options={})
  @show_marker = false
  @marker_symbol = options[:marker_symbol] ? options[:marker_symbol] : :default
  @smooth = false
  @labels, @data = nil, nil
  super(chart, options)
  @labels = AxDataSource.new(:data => options[:labels]) unless options[:labels].nil?
  @data = NumDataSource.new(options) unless options[:data].nil?
end