Class: Writexlsx::Chart::Caption

Inherits:
Object
  • Object
show all
Defined in:
lib/write_xlsx/chart/caption.rb

Direct Known Subclasses

Axis

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(chart) ⇒ Caption


9
10
11
# File 'lib/write_xlsx/chart/caption.rb', line 9

def initialize(chart)
  @chart = chart
end

Instance Attribute Details

#data_idObject

Returns the value of attribute data_id


6
7
8
# File 'lib/write_xlsx/chart/caption.rb', line 6

def data_id
  @data_id
end

#formulaObject

Returns the value of attribute formula


6
7
8
# File 'lib/write_xlsx/chart/caption.rb', line 6

def formula
  @formula
end

#layoutObject (readonly)

Returns the value of attribute layout


7
8
9
# File 'lib/write_xlsx/chart/caption.rb', line 7

def layout
  @layout
end

#nameObject

Returns the value of attribute name


6
7
8
# File 'lib/write_xlsx/chart/caption.rb', line 6

def name
  @name
end

#name_fontObject

Returns the value of attribute name_font


6
7
8
# File 'lib/write_xlsx/chart/caption.rb', line 6

def name_font
  @name_font
end

#noneObject (readonly)

Returns the value of attribute none


7
8
9
# File 'lib/write_xlsx/chart/caption.rb', line 7

def none
  @none
end

#overlayObject (readonly)

Returns the value of attribute overlay


7
8
9
# File 'lib/write_xlsx/chart/caption.rb', line 7

def overlay
  @overlay
end

Instance Method Details

#merge_with_hash(params) ⇒ Object

:nodoc:


13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/write_xlsx/chart/caption.rb', line 13

def merge_with_hash(params) # :nodoc:
  @name, @formula = @chart.process_names(params[:name], params[:name_formula])
  @data_id        = @chart.data_id(@formula, params[:data])
  @name_font      = @chart.convert_font_args(params[:name_font])
  @layout   = @chart.layout_properties(params[:layout], 1)

  # Set the title overlay option.
  @overlay  = params[:overlay]

  # Set the no automatic title option.
  @none = params[:none]
end