Class: Writexlsx::Chart::Caption
- Inherits:
-
Object
- Object
- Writexlsx::Chart::Caption
- Includes:
- Utility::Common, Utility::RichText
- Defined in:
- lib/write_xlsx/chart/caption.rb
Constant Summary
Constants included from Utility::Common
Utility::Common::PERL_TRUE_VALUES
Instance Attribute Summary collapse
-
#data_id ⇒ Object
Returns the value of attribute data_id.
-
#fill ⇒ Object
Returns the value of attribute fill.
-
#font ⇒ Object
Returns the value of attribute font.
-
#formula ⇒ Object
Returns the value of attribute formula.
-
#gradient ⇒ Object
Returns the value of attribute gradient.
-
#layout ⇒ Object
readonly
Returns the value of attribute layout.
-
#line ⇒ Object
Returns the value of attribute line.
-
#name ⇒ Object
Returns the value of attribute name.
-
#none ⇒ Object
readonly
Returns the value of attribute none.
-
#overlay ⇒ Object
readonly
Returns the value of attribute overlay.
-
#pattern ⇒ Object
Returns the value of attribute pattern.
Instance Method Summary collapse
- #apply_format_options(params) ⇒ Object
-
#apply_text_options(params) ⇒ Object
:nodoc:.
-
#initialize(chart) ⇒ Caption
constructor
A new instance of Caption.
Methods included from Utility::RichText
#convert_font_args, #get_font_latin_attributes, #get_font_style_attributes, #params_to_font, #underline_attributes, #write_a_body_pr, #write_a_def_rpr, #write_a_end_para_rpr, #write_a_lst_style, #write_a_p_formula, #write_a_p_pr_formula, #write_def_rpr_r_pr_common, #write_tx_pr
Methods included from Utility::Common
#absolute_char, #check_parameter, #float_to_str, #ptrue?, #put_deprecate_message
Constructor Details
#initialize(chart) ⇒ Caption
Returns a new instance of Caption.
14 15 16 |
# File 'lib/write_xlsx/chart/caption.rb', line 14 def initialize(chart) @chart = chart end |
Instance Attribute Details
#data_id ⇒ Object
Returns the value of attribute data_id.
10 11 12 |
# File 'lib/write_xlsx/chart/caption.rb', line 10 def data_id @data_id end |
#fill ⇒ Object
Returns the value of attribute fill.
11 12 13 |
# File 'lib/write_xlsx/chart/caption.rb', line 11 def fill @fill end |
#font ⇒ Object
Returns the value of attribute font.
10 11 12 |
# File 'lib/write_xlsx/chart/caption.rb', line 10 def font @font end |
#formula ⇒ Object
Returns the value of attribute formula.
10 11 12 |
# File 'lib/write_xlsx/chart/caption.rb', line 10 def formula @formula end |
#gradient ⇒ Object
Returns the value of attribute gradient.
11 12 13 |
# File 'lib/write_xlsx/chart/caption.rb', line 11 def gradient @gradient end |
#layout ⇒ Object (readonly)
Returns the value of attribute layout.
12 13 14 |
# File 'lib/write_xlsx/chart/caption.rb', line 12 def layout @layout end |
#line ⇒ Object
Returns the value of attribute line.
11 12 13 |
# File 'lib/write_xlsx/chart/caption.rb', line 11 def line @line end |
#name ⇒ Object
Returns the value of attribute name.
10 11 12 |
# File 'lib/write_xlsx/chart/caption.rb', line 10 def name @name end |
#none ⇒ Object (readonly)
Returns the value of attribute none.
12 13 14 |
# File 'lib/write_xlsx/chart/caption.rb', line 12 def none @none end |
#overlay ⇒ Object (readonly)
Returns the value of attribute overlay.
12 13 14 |
# File 'lib/write_xlsx/chart/caption.rb', line 12 def @overlay end |
#pattern ⇒ Object
Returns the value of attribute pattern.
11 12 13 |
# File 'lib/write_xlsx/chart/caption.rb', line 11 def pattern @pattern end |
Instance Method Details
#apply_format_options(params) ⇒ Object
29 30 31 32 33 34 |
# File 'lib/write_xlsx/chart/caption.rb', line 29 def (params) @line = chart.line_properties(params[:border] || params[:line]) @fill = chart.fill_properties(params[:fill]) @pattern = chart.pattern_properties(params[:pattern]) @gradient = chart.gradient_properties(params[:gradient]) end |
#apply_text_options(params) ⇒ Object
:nodoc:
18 19 20 21 22 23 24 25 26 27 |
# File 'lib/write_xlsx/chart/caption.rb', line 18 def (params) # :nodoc: @name, @formula = chart.process_names(params[:name], params[:name_formula]) @name = nil if @name.respond_to?(:empty?) && @name.empty? @data_id = chart.data_id(@formula, params[:data]) @font = convert_font_args(params[:font] || params[:name_font]) @layout = chart.layout_properties(params[:layout], 1) @overlay = params[:overlay] @none = params[:none] end |