Class: Axlsx::Series
- Inherits:
-
Object
- Object
- Axlsx::Series
- Defined in:
- lib/axlsx/drawing/series.rb
Overview
Note:
The recommended way to manage series is to use Chart#add_series
A Series defines the title, data and labels for chart data.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#chart ⇒ Chart
readonly
The chart that owns this series.
-
#index ⇒ Object
readonly
retrieves the series index in the chart’s series collection.
-
#order ⇒ Integer
The order of this series in the chart’s series.
-
#title ⇒ SeriesTitle
The title of the series.
Instance Method Summary collapse
-
#initialize(chart, options = {}) ⇒ Series
constructor
Creates a new series.
Constructor Details
#initialize(chart, options = {}) ⇒ Series
Creates a new series
28 29 30 31 32 33 34 |
# File 'lib/axlsx/drawing/series.rb', line 28 def initialize(chart, ={}) self.chart = chart @chart.series << self .each do |o| self.send("#{o[0]}=", o[1]) if self.respond_to? "#{o[0]}=" end end |
Instance Attribute Details
#chart ⇒ Chart
The chart that owns this series
10 11 12 |
# File 'lib/axlsx/drawing/series.rb', line 10 def chart @chart end |
#index ⇒ Object (readonly)
retrieves the series index in the chart’s series collection
14 15 16 |
# File 'lib/axlsx/drawing/series.rb', line 14 def index @index end |
#order ⇒ Integer
The order of this series in the chart’s series.
18 19 20 |
# File 'lib/axlsx/drawing/series.rb', line 18 def order @order end |
#title ⇒ SeriesTitle
The title of the series
22 23 24 |
# File 'lib/axlsx/drawing/series.rb', line 22 def title @title end |