Class: Writeexcel::Worksheet::EmbeddedChart
- Inherits:
-
Object
- Object
- Writeexcel::Worksheet::EmbeddedChart
- Defined in:
- lib/writeexcel/embedded_chart.rb
Instance Attribute Summary collapse
-
#chart ⇒ Object
readonly
Returns the value of attribute chart.
-
#col ⇒ Object
readonly
Returns the value of attribute col.
-
#row ⇒ Object
readonly
Returns the value of attribute row.
-
#vertices ⇒ Object
readonly
Returns the value of attribute vertices.
Instance Method Summary collapse
-
#calc_vertices ⇒ Object
Calculate the positions of comment object.
-
#initialize(worksheet, row, col, chart, x_offset = 0, y_offset = 0, scale_x = 1, scale_y = 1) ⇒ EmbeddedChart
constructor
A new instance of EmbeddedChart.
Constructor Details
#initialize(worksheet, row, col, chart, x_offset = 0, y_offset = 0, scale_x = 1, scale_y = 1) ⇒ EmbeddedChart
Returns a new instance of EmbeddedChart.
9 10 11 12 13 14 15 16 |
# File 'lib/writeexcel/embedded_chart.rb', line 9 def initialize(worksheet, row, col, chart, x_offset = 0, y_offset = 0, scale_x = 1, scale_y = 1) @worksheet = worksheet @row, @col, @chart, @x_offset, @y_offset, @scale_x, @scale_y = row, col, chart, x_offset, y_offset, scale_x, scale_y @width = default_width * scale_x @height = default_height * scale_y @vertices = calc_vertices end |
Instance Attribute Details
#chart ⇒ Object (readonly)
Returns the value of attribute chart.
7 8 9 |
# File 'lib/writeexcel/embedded_chart.rb', line 7 def chart @chart end |
#col ⇒ Object (readonly)
Returns the value of attribute col.
7 8 9 |
# File 'lib/writeexcel/embedded_chart.rb', line 7 def col @col end |
#row ⇒ Object (readonly)
Returns the value of attribute row.
7 8 9 |
# File 'lib/writeexcel/embedded_chart.rb', line 7 def row @row end |
#vertices ⇒ Object (readonly)
Returns the value of attribute vertices.
7 8 9 |
# File 'lib/writeexcel/embedded_chart.rb', line 7 def vertices @vertices end |
Instance Method Details
#calc_vertices ⇒ Object
Calculate the positions of comment object.
19 20 21 |
# File 'lib/writeexcel/embedded_chart.rb', line 19 def calc_vertices @worksheet.position_object( @col, @row, @x_offset, @y_offset, @width, @height) end |