Class: Axlsx::Series
- Inherits:
-
Object
- Object
- Axlsx::Series
- Includes:
- OptionsParser
- 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 common series attributes and is the super class for all concrete series types.
Direct Known Subclasses
AreaSeries, BarSeries, BubbleSeries, LineSeries, PieSeries, ScatterSeries
Instance Attribute Summary collapse
-
#chart ⇒ Chart
readonly
The chart that owns this series.
-
#title ⇒ SeriesTitle
The title of the series.
Instance Method Summary collapse
-
#index ⇒ Integer
The index of this series in the chart's series.
-
#initialize(chart, options = {}) ⇒ Series
constructor
Creates a new series.
-
#order ⇒ Integer
The order of this series in the chart's series.
- #order=(v) ⇒ Object
Methods included from OptionsParser
Constructor Details
#initialize(chart, options = {}) ⇒ Series
Creates a new series
23 24 25 26 27 28 |
# File 'lib/axlsx/drawing/series.rb', line 23 def initialize(chart, = {}) @order = nil self.chart = chart @chart.series << self end |
Instance Attribute Details
#chart ⇒ Chart
The chart that owns this series
13 14 15 |
# File 'lib/axlsx/drawing/series.rb', line 13 def chart @chart end |
#title ⇒ SeriesTitle
The title of the series
17 18 19 |
# File 'lib/axlsx/drawing/series.rb', line 17 def title @title end |
Instance Method Details
#index ⇒ Integer
The index of this series in the chart's series.
32 33 34 |
# File 'lib/axlsx/drawing/series.rb', line 32 def index @chart.series.index(self) end |
#order ⇒ Integer
The order of this series in the chart's series. By default the order is the index of the series.
38 39 40 |
# File 'lib/axlsx/drawing/series.rb', line 38 def order @order || index end |
#order=(v) ⇒ Object
43 44 45 46 |
# File 'lib/axlsx/drawing/series.rb', line 43 def order=(v) Axlsx.validate_unsigned_int(v) @order = v end |