lib/axlsx/drawing/series.rb in axlsx-1.0.6 vs lib/axlsx/drawing/series.rb in axlsx-1.0.7
- old
+ new
@@ -1,7 +1,7 @@
module Axlsx
- # A Series defines the title, data and labels for chart data.
+ # A Series defines the common series attributes and is the super class for all concrete series types.
# @note The recommended way to manage series is to use Chart#add_series
# @see Worksheet#add_chart
# @see Chart#add_series
class Series
@@ -11,11 +11,11 @@
# The index of this series in the chart's series.
# @return [Integer]
attr_reader :index
- # The order of this series in the chart's series.
+ # The order of this series in the chart's series. By default the order is the index of the series.
# @return [Integer]
attr_accessor :order
# The title of the series
# @return [SeriesTitle]
@@ -31,10 +31,9 @@
options.each do |o|
self.send("#{o[0]}=", o[1]) if self.respond_to? "#{o[0]}="
end
end
- # retrieves the series index in the chart's series collection
def index
@chart.series.index(self)
end
def order=(v) Axlsx::validate_unsigned_int(v); @order = v; end