Method: Axlsx::DataBar#initialize

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

#initialize(options = {}) {|_self| ... } ⇒ DataBar

Creates a new data bar conditional formatting object

Parameters:

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

    a customizable set of options

Options Hash (options):

  • minLength (Integer)
  • maxLength (Integer)
  • showValue (Boolean)
  • color (String)
    • the rbg value used to color the bars

Yields:

  • (_self)

Yield Parameters:



48
49
50
51
52
53
54
55
56
57
# File 'lib/axlsx/workbook/worksheet/data_bar.rb', line 48

def initialize(options = {})
  @minLength = 10
  @maxLength = 90
  @showValue = true
  initialize_value_objects
  options.each do |o|
    self.send("#{o[0]}=", o[1]) if self.respond_to? "#{o[0]}="
  end
  yield self if block_given?
end