Method: Axlsx::BarSeries#initialize

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

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

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)
  • title (String)
  • shape (String)


28
29
30
31
32
33
# File 'lib/axlsx/drawing/bar_series.rb', line 28

def initialize(chart, options={})
  @shape = :box
  super(chart, options)
  self.labels = CatAxisData.new(options[:labels]) unless options[:labels].nil?
  self.data = ValAxisData.new(options[:data]) unless options[:data].nil?
end